summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortriaxx <triaxx@pkgsrc.org>2020-11-04 08:36:52 +0000
committertriaxx <triaxx@pkgsrc.org>2020-11-04 08:36:52 +0000
commit7d4076a97a965376dee0ec8a2422f7ca3e17aeea (patch)
tree0ed22be289890c93029b8093da101ded52101f66
parent9591fce1d2fe3cd6ba22c0bae83b86d174160a2d (diff)
downloadpkgsrc-7d4076a97a965376dee0ec8a2422f7ca3e17aeea.tar.gz
gnustep-objc: fix build on FreeBSD
pkgsrc changes: --------------- * Add conditional installation of libobjcxx.so in GNUmakefile for FreeBSD and adjust PLIST accordingly. * Fix some typos that have been kindly suggested by pkglint.
-rw-r--r--devel/gnustep-objc/Makefile20
-rw-r--r--devel/gnustep-objc/PLIST14
-rw-r--r--devel/gnustep-objc/buildlink3.mk4
-rw-r--r--devel/gnustep-objc/distinfo4
-rw-r--r--devel/gnustep-objc/patches/patch-GNUmakefile20
5 files changed, 36 insertions, 26 deletions
diff --git a/devel/gnustep-objc/Makefile b/devel/gnustep-objc/Makefile
index f918f68d672..4a815249821 100644
--- a/devel/gnustep-objc/Makefile
+++ b/devel/gnustep-objc/Makefile
@@ -1,15 +1,14 @@
-# $NetBSD: Makefile,v 1.34 2020/08/21 00:44:55 pho Exp $
+# $NetBSD: Makefile,v 1.35 2020/11/04 08:36:52 triaxx Exp $
DISTNAME= libobjc2-1.8.1
PKGNAME= ${DISTNAME:S/libobjc2/gnustep-objc/}
-#PKGREVISION= 1
CATEGORIES= devel gnustep
-MASTER_SITES= ftp://ftp.gnustep.org/pub/gnustep/libs/
-EXTRACT_SUFX= .tar.gz
+MASTER_SITES= ${MASTER_SITE_GNUSTEP:=libs/}
MAINTAINER= pkgsrc-users@NetBSD.org
-#HOMEPAGE= https://github.com/gnustep/gnustep-libobjc2
+HOMEPAGE= https://github.com/gnustep/libobjc2
COMMENT= Objective-C runtime
+LICENSE= mit
USE_LANGUAGES= objc c++11
USE_TOOLS+= gmake cmake
@@ -20,21 +19,26 @@ MAKE_ENV+= LIBOBJCXX=libobjcxx
MAKE_ENV+= VERSION=4.6
MAKE_ENV+= MAJOR_VERSION=4
MAKE_ENV+= MINOR_VERSION=6
-GNUSTEP_OVERRIDE_INSTALL= YES
-INSTALLATION_DIRS= lib include/objc
+INSTALLATION_DIRS= lib include/objc
do-configure:
cd ${WRKSRC} && ${CMAKE} -Wno-dev ${CMAKE_ARGS} .
-
.include "../../devel/gnustep-make/buildlink3.mk"
.include "../../mk/compiler.mk"
+.include "../../mk/bsd.prefs.mk"
+
# Building tests with GCC is not supported.
.if empty(CC_VERSION:Mclang-*)
CMAKE_ARGS+= -DTESTS:BOOL=FALSE
.endif
+PLIST_VARS+= objcxx
+.if ${OPSYS} != "FreeBSD"
+PLIST.objcxx= yes
+.endif
+
.include "../../mk/pthread.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/devel/gnustep-objc/PLIST b/devel/gnustep-objc/PLIST
index 55e0cfb82e5..2186ff3b35a 100644
--- a/devel/gnustep-objc/PLIST
+++ b/devel/gnustep-objc/PLIST
@@ -1,10 +1,4 @@
-@comment $NetBSD: PLIST,v 1.7 2020/04/16 09:28:39 manu Exp $
-lib/libobjc.so
-lib/libobjc.so.4
-lib/libobjc.so.4.6
-lib/libobjcxx.so
-lib/libobjcxx.so.4
-lib/libobjcxx.so.4.6
+@comment $NetBSD: PLIST,v 1.8 2020/11/04 08:36:52 triaxx Exp $
include/objc/Availability.h
include/objc/Object.h
include/objc/Protocol.h
@@ -23,3 +17,9 @@ include/objc/runtime-deprecated.h
include/objc/runtime.h
include/objc/slot.h
include/objc/toydispatch.h
+lib/libobjc.so
+lib/libobjc.so.4
+lib/libobjc.so.4.6
+${PLIST.objcxx}lib/libobjcxx.so
+${PLIST.objcxx}lib/libobjcxx.so.4
+${PLIST.objcxx}lib/libobjcxx.so.4.6
diff --git a/devel/gnustep-objc/buildlink3.mk b/devel/gnustep-objc/buildlink3.mk
index 8d617e2faec..a8ff1bd2529 100644
--- a/devel/gnustep-objc/buildlink3.mk
+++ b/devel/gnustep-objc/buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.13 2020/04/16 17:32:09 joerg Exp $
+# $NetBSD: buildlink3.mk,v 1.14 2020/11/04 08:36:52 triaxx Exp $
BUILDLINK_TREE+= gnustep-objc
@@ -9,7 +9,7 @@ BUILDLINK_API_DEPENDS.gnustep-objc+= gnustep-objc>=1.3.0
BUILDLINK_ABI_DEPENDS.gnustep-objc+= gnustep-objc>=1.3.0nb1
BUILDLINK_PKGSRCDIR.gnustep-objc?= ../../devel/gnustep-objc
-BUILDLINK_CFLAGS.gnustep-objc+= -I${BUILDLINK_PREFIX.gnustep-objc}/include/objc
+BUILDLINK_CFLAGS.gnustep-objc+= -I${BUILDLINK_PREFIX.gnustep-objc}/include/objc
BUILDLINK_LDFLAGS.gnustep-objc+= -lobjc -lpthread
.include "../../devel/gnustep-make/buildlink3.mk"
diff --git a/devel/gnustep-objc/distinfo b/devel/gnustep-objc/distinfo
index 1e02a3e4b8e..41ed44a786f 100644
--- a/devel/gnustep-objc/distinfo
+++ b/devel/gnustep-objc/distinfo
@@ -1,9 +1,9 @@
-$NetBSD: distinfo,v 1.13 2020/04/17 13:32:23 joerg Exp $
+$NetBSD: distinfo,v 1.14 2020/11/04 08:36:52 triaxx Exp $
SHA1 (libobjc2-1.8.1.tar.gz) = 28b53704d481de4414bfe6ae94f2a84358ef766d
RMD160 (libobjc2-1.8.1.tar.gz) = 1beaf2a2ee4ef1370bbb2fac4f7b1d233f0a9e09
SHA512 (libobjc2-1.8.1.tar.gz) = 518f36e96a82a076fc67fe384226bd97310cd10a53c7b0951db9f3658aa534582b245d5cb97956fe91c38338c3fc8f1e569dd8af36f6d12e32bf1460251d02eb
Size (libobjc2-1.8.1.tar.gz) = 173635 bytes
-SHA1 (patch-GNUmakefile) = 0760597d10e72019f5159f9b14996bf7244e6f99
+SHA1 (patch-GNUmakefile) = 7e6b8f09599c2b568346b392cd5d7654b1c747a4
SHA1 (patch-objcxx_eh.cc) = 8804d075cb46380165e40af5f4abd5d8d413b92a
SHA1 (patch-objcxx_eh.h) = 68a3709ed9d029e6ae4c7a6cc375678ee7c21b1e
diff --git a/devel/gnustep-objc/patches/patch-GNUmakefile b/devel/gnustep-objc/patches/patch-GNUmakefile
index da213cc76f9..14356fced5c 100644
--- a/devel/gnustep-objc/patches/patch-GNUmakefile
+++ b/devel/gnustep-objc/patches/patch-GNUmakefile
@@ -1,19 +1,24 @@
-$NetBSD: patch-GNUmakefile,v 1.2 2020/04/16 09:28:39 manu Exp $
+$NetBSD: patch-GNUmakefile,v 1.3 2020/11/04 08:36:53 triaxx Exp $
-Install fixes
+* Replace absolute paths by DESTDIR
+* Replace install by pkgsrc's INSTALL_*
+* Add conditionnal test for installation of LIBOBJCXX on FreeBSD
---- GNUmakefile.orig 2015-08-07 13:33:41.000000000 +0200
-+++ GNUmakefile 2020-04-15 03:22:59.875513487 +0200
-@@ -78,22 +78,22 @@
+--- GNUmakefile.orig 2015-08-07 11:33:41.000000000 +0000
++++ GNUmakefile
+@@ -78,21 +78,25 @@ endif
install: all
$(SILENT)echo Installing libraries...
- $(SILENT)install -d $(LIB_DIR)
+- $(SILENT)install -d $(LIB_DIR)
- $(SILENT)install -m 444 $(STRIP) $(LIBOBJC).so.$(VERSION) $(LIB_DIR)
- $(SILENT)install -m 444 $(STRIP) $(LIBOBJCXX).so.$(VERSION) $(LIB_DIR)
- $(SILENT)install -m 444 $(STRIP) $(LIBOBJC).a $(LIB_DIR)
++ $(SILENT)install -d $(LIB_DIR)
+ $(SILENT)install -m 444 $(STRIP) $(LIBOBJC).so.$(VERSION) $(DESTDIR)/$(LIB_DIR)
++ifneq ($(findstring freebsd, $(shell $(CC) -dumpmachine)), freebsd)
+ $(SILENT)install -m 444 $(STRIP) $(LIBOBJCXX).so.$(VERSION) $(DESTDIR)/$(LIB_DIR)
++endif
+ #$(SILENT)install -m 444 $(STRIP) $(LIBOBJC).a $(LIB_DIR)
$(SILENT)echo Creating symbolic links...
- $(SILENT)ln -sf $(LIBOBJC).so.$(VERSION) $(LIB_DIR)/$(LIBOBJC).so
@@ -25,9 +30,11 @@ Install fixes
+ $(SILENT)ln -sf $(LIBOBJC).so.$(VERSION) $(DESTDIR)$(LIB_DIR)/$(LIBOBJC).so
+ $(SILENT)ln -sf $(LIBOBJC).so.$(VERSION) $(DESTDIR)$(LIB_DIR)/$(LIBOBJC).so.$(MAJOR_VERSION)
+ #$(SILENT)ln -sf $(LIBOBJC).so.$(VERSION) $(DESTDIR)$(LIB_DIR)/$(LIBOBJC).so.$(MAJOR_VERSION).$(MINOR_VERSION)
++ifneq ($(findstring freebsd, $(shell $(CC) -dumpmachine)), freebsd)
+ $(SILENT)ln -sf $(LIBOBJCXX).so.$(VERSION) $(DESTDIR)$(LIB_DIR)/$(LIBOBJCXX).so
+ $(SILENT)ln -sf $(LIBOBJCXX).so.$(VERSION) $(DESTDIR)$(LIB_DIR)/$(LIBOBJCXX).so.$(MAJOR_VERSION)
+ #$(SILENT)ln -sf $(LIBOBJCXX).so.$(VERSION) $(DESTDIR)$(LIB_DIR)/$(LIBOBJCXX).so.$(MAJOR_VERSION).$(MINOR_VERSION)
++endif
$(SILENT)echo Installing headers...
- $(SILENT)install -d $(HEADER_DIR)/objc
- $(SILENT)install -m 444 objc/*.h $(HEADER_DIR)/objc
@@ -38,4 +45,3 @@ Install fixes
$(SILENT)echo "To use the newly installed objc2 library with GNUstep,"
$(SILENT)echo "please change to your gnustep-make directory and"
$(SILENT)echo "type 'configure; make install' to tell gnustep-make"
- $(SILENT)echo "to use the new library (you will then need to configure"