Codebase list libace-perl / 7afbb56
d/p/cross.patch,d/rules,d/control: Make build cross buildable Nilesh Patra 2 years ago
4 changed file(s) with 88 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
55 Testsuite: autopkgtest-pkg-perl
66 Priority: optional
77 Build-Depends: debhelper-compat (= 13),
8 libtirpc-dev
8 libtirpc-dev,
9 perl-xs-dev
910 Standards-Version: 4.5.1
1011 Vcs-Browser: https://salsa.debian.org/med-team/libace-perl
1112 Vcs-Git: https://salsa.debian.org/med-team/libace-perl.git
0 Description: Use host compiler and linker instead of build compiler
1 Author: Nilesh Patra <nilesh@debian.org>
2 Last-Update: 2021-06-01
3 --- a/acelib/Makefile
4 +++ b/acelib/Makefile
5 @@ -2,6 +2,7 @@
6 false = 0
7 RANLIB_NEEDED = true # default overridable in $(ACEDB_MACHINE)_DEF
8 AR_OPTIONS = rlu # default overridable in $(ACEDB_MACHINE)_DEF
9 +AR = ar
10
11 RPCGEN_FLAGS = -I -K -1
12 # -I -K -1 good for alpha
13 @@ -42,7 +43,7 @@
14 ## Different platforms use CC or COMPILE.c
15 # (USEROPTS - see comments at top of file)
16 #
17 -CC = $(COMPILER) $(CFLAGS) $(CPPFLAGS) $(USEROPTS) $(IDIR) -D$(NAME) -c
18 +CC_compile = $(COMPILER) $(CFLAGS) $(CPPFLAGS) $(USEROPTS) $(IDIR) -D$(NAME) -c
19 COMPILE.c = $(COMPILER) $(CFLAGS) $(CPPFLAGS) $(USEROPTS) $(IDIR) -D$(NAME) -c
20
21 ###########################################################
22 @@ -63,11 +64,11 @@
23 ################## libraries #########################
24
25 libaceperl.a : $(FREE_OBJS) aceclientlib.o rpcace_clnt.o rpcace_xdr.o
26 - ar $(AR_OPTIONS) $@ $?
27 + $(AR) $(AR_OPTIONS) $@ $?
28 if ( $(RANLIB_NEEDED) ) then ranlib $@; fi
29
30 libfree.a : $(FREE_OBJS)
31 - ar $(AR_OPTIONS) libfree.a $?
32 + $(AR) $(AR_OPTIONS) libfree.a $?
33 if ( $(RANLIB_NEEDED) ) then ranlib libfree.a; fi
34
35 #########################################
36 @@ -87,7 +88,7 @@
37 LIBACE_OBJS = $(GENERIC_ACE_OBJS) $(GENERIC_ACE_NONGRAPH_OBJS) aceversion.o
38
39 libace.a : $(LIBACE_OBJS)
40 - ar $(AR_OPTIONS) libace.a $?
41 + $(AR) $(AR_OPTIONS) libace.a $?
42 if ( $(RANLIB_NEEDED) ) then ranlib libace.a; fi
43
44 ######################################################
45 @@ -106,7 +107,7 @@
46 rpcace_sp.o: rpcace_sp.c rpcace_svc.c
47
48 aceclientlib.o: aceclientlib.c rpcace.h
49 - $(CC) $(LDFLAGS) -c $<
50 + $(CC_compile) $(LDFLAGS) -c $<
51
52 RPC_CLIENT_OBJS = aceclientlib.o rpcace_clnt.o rpcace_xdr.o
53 RPC_SERVER_OBJS = rpcace_sp.o rpcace_xdr.o
54 @@ -114,7 +115,7 @@
55 RPC_X_CLIENT_OBJS = xclient.o aceclientlib.o rpcace_clnt.o rpcace_xdr.o
56
57 libacecl.a : aceclientlib.o rpcace_clnt.o rpcace_xdr.o
58 - ar $(AR_OPTIONS) libacecl.a $?
59 + $(AR) $(AR_OPTIONS) libacecl.a $?
60 if ( $(RANLIB_NEEDED) ) then ranlib libacecl.a; fi
61
62 ###########################################################
63 --- a/acelib/wmake/LINUX_DEF
64 +++ b/acelib/wmake/LINUX_DEF
65 @@ -15,9 +15,10 @@
66 ##### following the explanations given in wmake/truemake #####
67 #################################################################
68
69 +CC = gcc
70 NAME = LINUX
71 -COMPILER = gcc -g -Wall -O2 -DACEDB4
72 -LINKER = gcc -g
73 +COMPILER = $(CC) -g -Wall -O2 -DACEDB4
74 +LINKER = $(CC) -g
75 USEROPTS=-fPIC
76
77 LIBS = -lm
22 defined_hash_array.patch
33 libtirpc.patch
44 hardening.patch
5 cross.patch
44 TMP = $(CURDIR)/debian/$(PACKAGE)
55
66 export DEB_BUILD_MAINT_OPTIONS=hardening=+all
7 include /usr/share/dpkg/buildtools.mk
8 include /usr/share/dpkg/architecture.mk
9 PERLVER := $(shell perl -MConfig -e 'print $$Config{version}')
10 ARCHLIB := $(shell perl -I/usr/lib/$(DEB_HOST_MULTIARCH)/perl/cross-config-$(PERLVER) -MConfig -e 'print $$Config{vendorarch}')
711
812 %:
913 dh $@
2630 # Directory for the acebrowser CGI scripts (~username ok): [/usr/local/apache/cgi-bin/ace]
2731 # Directory does not exist. Shall I create it for you? [y]
2832 # Directory for the acebrowser HTML files and images (~username ok): [/usr/local/apache/htdocs/ace]
29 perl -e "print qq(3\ny\n$(CURDIR)/debian/$(PACKAGE)/etc/libace-perl\ny\n$(CURDIR)/debian/$(PACKAGE)/usr/lib/cgi-bin\ny\n$(CURDIR)/debian/$(PACKAGE)/usr/share/$(PACKAGE))" | $(PERL) Makefile.PL INSTALLDIRS=vendor
30 dh_auto_build -- OPTIMIZE="$(CFLAGS)" LD_RUN_PATH="" OTHERLDFLAGS="$(LDFLAGS)"
33 perl -e "print qq(3\ny\n$(CURDIR)/debian/$(PACKAGE)/etc/libace-perl\ny\n$(CURDIR)/debian/$(PACKAGE)/usr/lib/cgi-bin\ny\n$(CURDIR)/debian/$(PACKAGE)/usr/share/$(PACKAGE))" | $(PERL) Makefile.PL \
34 INSTALLDIRS=vendor CC=$(CC) LD=$(CC) INSTALLVENDORARCH=$(ARCHLIB) INSTALLARCHLIB=$(ARCHLIB)
35 dh_auto_build --buildsystem=makefile -- OPTIMIZE="$(CFLAGS)" LD_RUN_PATH="" OTHERLDFLAGS="$(LDFLAGS)"
3136
3237 override_dh_auto_test:
3338 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))