aboutsummaryrefslogtreecommitdiffstats
path: root/archivers
diff options
context:
space:
mode:
authordanfe <danfe@FreeBSD.org>2016-01-13 21:07:55 +0800
committerdanfe <danfe@FreeBSD.org>2016-01-13 21:07:55 +0800
commit925bca316d27a4ee1dad57d7540a469c97d740e7 (patch)
tree66b4a7748db24803fb681d82b66d11891a46bd8c /archivers
parent47cc1c918cda0b69d08ee7b9e9414a7f5e936673 (diff)
downloadfreebsd-ports-gnome-925bca316d27a4ee1dad57d7540a469c97d740e7.tar.gz
freebsd-ports-gnome-925bca316d27a4ee1dad57d7540a469c97d740e7.tar.zst
freebsd-ports-gnome-925bca316d27a4ee1dad57d7540a469c97d740e7.zip
- 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
Diffstat (limited to 'archivers')
-rw-r--r--archivers/unarchiver/Makefile9
-rw-r--r--archivers/unarchiver/files/patch-UniversalDetector_Makefile.freebsd22
-rw-r--r--archivers/unarchiver/files/patch-XADMaster_Makefile.freebsd22
3 files changed, 46 insertions, 7 deletions
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 <bsd.port.pre.mk>
+
+.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 <bsd.port.mk>
+.include <bsd.port.post.mk>
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 $@ $^