From 925bca316d27a4ee1dad57d7540a469c97d740e7 Mon Sep 17 00:00:00 2001 From: danfe Date: Wed, 13 Jan 2016 13:07:55 +0000 Subject: - Base GCC cannot compile this port ("cc: XADTest2.m: Objective-C compiler not installed on this system"); luckily, Clang is available on all recent Tier-1 FreeBSD versions, so use it where it is not the default compiler yet (prior to 1000024, e.g. on 9.x) - Make the port more robust by allowing to build if LOCALBASE != /usr/local Reported by: pkg-fallout --- archivers/unarchiver/Makefile | 9 ++++++++- .../files/patch-UniversalDetector_Makefile.freebsd | 22 +++++++++++++++++++--- .../files/patch-XADMaster_Makefile.freebsd | 22 +++++++++++++++++++--- 3 files changed, 46 insertions(+), 7 deletions(-) (limited to 'archivers/unarchiver') diff --git a/archivers/unarchiver/Makefile b/archivers/unarchiver/Makefile index d9c2bb249671..1c59ba58692e 100644 --- a/archivers/unarchiver/Makefile +++ b/archivers/unarchiver/Makefile @@ -29,6 +29,13 @@ PORTEXAMPLES= lsar.bash_completion unar.bash_completion OPTIONS_DEFINE= DOCS EXAMPLES +.include + +.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1000024 +CC= clang +CXX= clang++ +.endif + do-install: ${INSTALL_PROGRAM} ${WRKSRC}/XADMaster/??ar ${STAGEDIR}${PREFIX}/bin ${INSTALL_MAN} ${WRKSRC}/Extra/??ar.1 ${STAGEDIR}${MANPREFIX}/man/man1 @@ -42,4 +49,4 @@ do-install-EXAMPLES-on: ${INSTALL_DATA} ${WRKSRC}/Extra/??ar.bash_completion \ ${STAGEDIR}${EXAMPLESDIR} -.include +.include diff --git a/archivers/unarchiver/files/patch-UniversalDetector_Makefile.freebsd b/archivers/unarchiver/files/patch-UniversalDetector_Makefile.freebsd index e356cbe7a811..021d56a92c93 100644 --- a/archivers/unarchiver/files/patch-UniversalDetector_Makefile.freebsd +++ b/archivers/unarchiver/files/patch-UniversalDetector_Makefile.freebsd @@ -12,7 +12,7 @@ # Options for compilation -@@ -16,10 +13,9 @@ GNUSTEP_OPTS = -DGNUSTEP \ +@@ -16,13 +13,12 @@ GNUSTEP_OPTS = -DGNUSTEP \ -fobjc-exceptions \ -fconstant-string-class=NSConstantString @@ -22,5 +22,21 @@ -Wno-multichar \ - -g \ -D_FILE_OFFSET_BITS=64 \ - -isystem /usr/local/GNUstep/System/Library/Headers \ - -I/usr/local/include +- -isystem /usr/local/GNUstep/System/Library/Headers \ +- -I/usr/local/include ++ -isystem $(LOCALBASE)/GNUstep/System/Library/Headers \ ++ -I$(LOCALBASE)/include + + OBJC_OPTS = -std=gnu99 + +@@ -46,8 +42,8 @@ LIBS = -Wl,--no-whole-archive \ + ALL_LDFLAGS = -Wl,--whole-archive \ + -fexceptions \ + -fgnu-runtime \ +- -L/usr/local/GNUstep/System/Library/Libraries \ +- -L/usr/local/lib \ ++ -L$(LOCALBASE)/GNUstep/System/Library/Libraries \ ++ -L$(LOCALBASE)/lib \ + $(LDFLAGS) + + # Paths diff --git a/archivers/unarchiver/files/patch-XADMaster_Makefile.freebsd b/archivers/unarchiver/files/patch-XADMaster_Makefile.freebsd index 31002d477bfa..1bb2b350c391 100644 --- a/archivers/unarchiver/files/patch-XADMaster_Makefile.freebsd +++ b/archivers/unarchiver/files/patch-XADMaster_Makefile.freebsd @@ -12,7 +12,7 @@ # Options for compilation -@@ -16,10 +13,8 @@ GNUSTEP_OPTS = -DGNUSTEP \ +@@ -16,13 +13,11 @@ GNUSTEP_OPTS = -DGNUSTEP \ -fobjc-exceptions \ -fconstant-string-class=NSConstantString @@ -22,8 +22,13 @@ -Wno-multichar \ - -g \ -D_FILE_OFFSET_BITS=64 \ - -isystem /usr/local/GNUstep/System/Library/Headers \ - -I/usr/local/include +- -isystem /usr/local/GNUstep/System/Library/Headers \ +- -I/usr/local/include ++ -isystem $(LOCALBASE)/GNUstep/System/Library/Headers \ ++ -I$(LOCALBASE)/include + + OBJC_OPTS = -std=gnu99 + @@ -42,6 +37,7 @@ LIBS = -Wl,--no-whole-archive \ -lgnustep-base \ -lz \ @@ -32,6 +37,17 @@ -licuuc \ -lobjc \ -lm +@@ -49,8 +45,8 @@ LIBS = -Wl,--no-whole-archive \ + ALL_LDFLAGS = -Wl,--whole-archive \ + -fexceptions \ + -fgnu-runtime \ +- -L/usr/local/lib \ +- -L/usr/local/GNUstep/System/Library/Libraries \ ++ -L$(LOCALBASE)/lib \ ++ -L$(LOCALBASE)/GNUstep/System/Library/Libraries \ + $(LDFLAGS) + + # Paths @@ -74,7 +70,7 @@ libXADMaster.a: $(LIBRARY_OBJS) $(AR) rcs $@ $^ -- cgit