pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

unifi6: Carry over net/unifi changes



Module Name:	pkgsrc-wip
Committed By:	Greg Troxel <gdt%lexort.com@localhost>
Pushed By:	gdt
Date:		Sat Aug 14 11:04:02 2021 -0400
Changeset:	4de756d66b94c425ccda75f2cbf995f6a81a8cd5

Modified Files:
	unifi6/Makefile
	unifi6/distinfo
Added Files:
	unifi6/TODO
	unifi6/patches/patch-snappy-java-1.0.5.4_Makefile
	unifi6/patches/patch-snappy-java-1.0.5.4_Makefile.common
Removed Files:
	unifi6/patches/patch-snappy-java_Makefile
	unifi6/patches/patch-snappy-java_Makefile.common

Log Message:
unifi6: Carry over net/unifi changes

This commit is mostly pkglint rather than functional (it does rename
patch files and change WRKSRC).

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=4de756d66b94c425ccda75f2cbf995f6a81a8cd5

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 unifi6/Makefile                                    | 28 ++++++++++++----------
 unifi6/TODO                                        |  5 ++++
 unifi6/distinfo                                    |  4 ++--
 unifi6/patches/patch-snappy-java-1.0.5.4_Makefile  | 15 ++++++++++++
 .../patch-snappy-java-1.0.5.4_Makefile.common      | 13 ++++++++++
 unifi6/patches/patch-snappy-java_Makefile          | 17 -------------
 unifi6/patches/patch-snappy-java_Makefile.common   | 15 ------------
 7 files changed, 50 insertions(+), 47 deletions(-)

diffs:
diff --git a/unifi6/Makefile b/unifi6/Makefile
index a78ac08f51..cd18c30876 100644
--- a/unifi6/Makefile
+++ b/unifi6/Makefile
@@ -29,6 +29,8 @@ EXTRACT_ONLY=		${DEFAULT_DISTFILES}
 # because it only ship linux binaries. The rcd script takes care of loading the
 # correct library.
 SNAPPY_JAVA=		snappy-java-1.0.5.4
+# github.mk only works for the main MASTER_SITES definition and does
+# not support SITES
 SITES.${SNAPPY_JAVA}.tar.gz=	-https://github.com/xerial/snappy-java/archive/${SNAPPY_JAVA:S/snappy-java-//}.tar.gz
 DISTFILES+=		${SNAPPY_JAVA}.tar.gz
 EXTRACT_ONLY+=		${SNAPPY_JAVA}.tar.gz
@@ -50,7 +52,7 @@ PKG_JVMS_ACCEPTED=	openjdk8
 PKGSRC_MAKE_ENV+=	JAVA_HOME=${PKG_JAVA_HOME}
 USE_LANGUAGES=		c c++	# for snappy JNI library
 USE_TOOLS+=		gmake pax
-WRKSRC=			${WRKDIR}/UniFi
+WRKSRC=			${WRKDIR}
 
 # Upstream documents 3.4.15, but 3.4.4 actually works.  Avoid mongodb4 because it
 # has a problematic license.
@@ -74,7 +76,7 @@ OWN_DIRS_PERMS+=	${PREFIX}/unifi/${d} ${UNIFI_USER} ${UNIFI_GROUP} 0700
 
 post-extract:
 # drop executable bit
-	find ${WRKSRC} -type f -print0 | xargs -0 chmod -x
+	find ${WRKSRC}/UniFi -type f -print0 | xargs -0 chmod -x
 	mkdir ${WRKDIR}/${SNAPPY_JAVA}/target
 	ln -s ${WRKDIR}/${SNAPPY} ${WRKDIR}/${SNAPPY_JAVA}/target
 # drop platform specific binaries
@@ -84,32 +86,32 @@ post-extract:
 .if (${OPSYS} != "Linux")
 	rm -rf ${WRKDIR}/UniFi/lib/native/Linux
 .else
-.if (${MACHINE_ARCH} != "aarch64")
+.  if (${MACHINE_ARCH} != "aarch64")
 	rm -rf ${WRKDIR}/UniFi/lib/native/Linux/aarch64
-.endif
-.if (${MACHINE_ARCH} != "armv7")
+.  endif
+.  if (${MACHINE_ARCH} != "earmv7")
 	rm -rf ${WRKDIR}/UniFi/lib/native/Linux/armv7
-.endif
-.if (${MACHINE_ARCH} != "x86_64")
+.  endif
+.  if (${MACHINE_ARCH} != "x86_64")
 	rm -rf ${WRKDIR}/UniFi/lib/native/Linux/x86_64
-.endif
+.  endif
 .endif
 .if (${OPSYS} != "Darwin")
 	rm -rf ${WRKDIR}/UniFi/lib/native/Mac
 .else
-.if (${MACHINE_ARCH} != "x86_64")
+.  if (${MACHINE_ARCH} != "x86_64")
 	rm -rf ${WRKDIR}/UniFi/lib/native/Mac/x86_64
-.endif
+.  endif
 .endif
 
 do-build:
 # bundled mongod is a linux binary; replace with symlink to native binary
-	rm -f ${WRKSRC}/bin/mongod
-	ln -s ${PREFIX}/bin/mongod ${WRKSRC}/bin/mongod
+	rm -f ${WRKSRC}/UniFi/bin/mongod
+	ln -s ${PREFIX}/bin/mongod ${WRKSRC}/UniFi/bin/mongod
 	cd ${WRKDIR}/${SNAPPY_JAVA} && ${BUILD_MAKE_CMD} native
 
 do-install:
-	cd ${WRKSRC} && pax -rw . ${DESTDIR}${PREFIX}/unifi
+	cd ${WRKSRC}/UniFi && pax -rw . ${DESTDIR}${PREFIX}/unifi
 	${INSTALL_LIB} ${WRKDIR}/${SNAPPY_JAVA}/target/snappy-1.0.5-Default/libsnappyjava.so ${DESTDIR}${PREFIX}/unifi/lib
 
 .include "../../mk/java-vm.mk"
diff --git a/unifi6/TODO b/unifi6/TODO
new file mode 100644
index 0000000000..8cf482e53a
--- /dev/null
+++ b/unifi6/TODO
@@ -0,0 +1,5 @@
+Apply from pkgsrc/net/unifi
+
+  RELRO changes
+
+Actually test, with and without RELRO.
diff --git a/unifi6/distinfo b/unifi6/distinfo
index 83c5ff845d..d0bb42f180 100644
--- a/unifi6/distinfo
+++ b/unifi6/distinfo
@@ -12,5 +12,5 @@ SHA1 (unifi-6.2.26.zip) = 097391c5b407da490e52b6e991eacf5fd26f90f8
 RMD160 (unifi-6.2.26.zip) = 8b790e420602f1e8b65528c64c4d331ea4d940e6
 SHA512 (unifi-6.2.26.zip) = fccffca9bcb31a1da2c389e83ea9a48e4cde6d958368d4d623d459bae095b57a4d7946086b0ac0e4dff5c4c565961ed2c11f7bc2dfbf8b5c6d590fb32af351e8
 Size (unifi-6.2.26.zip) = 152767218 bytes
-SHA1 (patch-snappy-java_Makefile) = ce9e30d266787890e82675cfaa2603ae4709eaab
-SHA1 (patch-snappy-java_Makefile.common) = ba9e39d1bc6e34e2fa4704831ba51feccfbb0638
+SHA1 (patch-snappy-java-1.0.5.4_Makefile) = 42f0a6661715ecf4b393fff2f96974d023fc887f
+SHA1 (patch-snappy-java-1.0.5.4_Makefile.common) = 949f08d500b45946c242f6128138ca985f7a2e54
diff --git a/unifi6/patches/patch-snappy-java-1.0.5.4_Makefile b/unifi6/patches/patch-snappy-java-1.0.5.4_Makefile
new file mode 100644
index 0000000000..efd26c92c6
--- /dev/null
+++ b/unifi6/patches/patch-snappy-java-1.0.5.4_Makefile
@@ -0,0 +1,15 @@
+$NetBSD$
+
+--- snappy-java-1.0.5.4/Makefile.orig	2014-07-04 05:20:00.000000000 +0000
++++ snappy-java-1.0.5.4/Makefile
+@@ -20,9 +20,7 @@ $(SNAPPY_ARCHIVE):
+ 	@mkdir -p $(@D)
+ 	curl -o$@ http://snappy.googlecode.com/files/snappy-$(VERSION).tar.gz
+ 
+-$(SNAPPY_UNPACKED): $(SNAPPY_ARCHIVE)
+-	tar xvfz $< -C $(TARGET)	
+-	touch $@
++$(SNAPPY_UNPACKED):
+ 
+ jni-header: $(SRC)/org/xerial/snappy/SnappyNative.h
+ 
diff --git a/unifi6/patches/patch-snappy-java-1.0.5.4_Makefile.common b/unifi6/patches/patch-snappy-java-1.0.5.4_Makefile.common
new file mode 100644
index 0000000000..3ef1e0893d
--- /dev/null
+++ b/unifi6/patches/patch-snappy-java-1.0.5.4_Makefile.common
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- snappy-java-1.0.5.4/Makefile.common.orig	2014-07-04 05:20:00.000000000 +0000
++++ snappy-java-1.0.5.4/Makefile.common
+@@ -54,7 +54,7 @@ CROSS_PREFIX :=
+ Default_CXX          := $(CROSS_PREFIX)g++
+ Default_STRIP        := $(CROSS_PREFIX)strip
+ Default_CXXFLAGS     := -I$(JAVA_HOME)/include -Ilib/inc_mac -O2 -fPIC -fvisibility=hidden
+-Default_LINKFLAGS    := -shared -static
++Default_LINKFLAGS    := -shared
+ Default_LIBNAME      := libsnappyjava.so
+ Default_SNAPPY_FLAGS := 
+ 
diff --git a/unifi6/patches/patch-snappy-java_Makefile b/unifi6/patches/patch-snappy-java_Makefile
deleted file mode 100644
index 6d97daa40e..0000000000
--- a/unifi6/patches/patch-snappy-java_Makefile
+++ /dev/null
@@ -1,17 +0,0 @@
-$NetBSD: patch-snappy-java_Makefile,v 1.1 2017/06/24 14:16:37 tnn Exp $
-
-It tries to download a distfile with curl. We manage this manually.
-
---- ../snappy-java-1.0.5.4/Makefile.orig	2014-07-04 05:20:00.000000000 +0000
-+++ ../snappy-java-1.0.5.4/Makefile
-@@ -20,9 +20,7 @@ $(SNAPPY_ARCHIVE):
- 	@mkdir -p $(@D)
- 	curl -o$@ http://snappy.googlecode.com/files/snappy-$(VERSION).tar.gz
- 
--$(SNAPPY_UNPACKED): $(SNAPPY_ARCHIVE)
--	tar xvfz $< -C $(TARGET)	
--	touch $@
-+$(SNAPPY_UNPACKED):
- 
- jni-header: $(SRC)/org/xerial/snappy/SnappyNative.h
- 
diff --git a/unifi6/patches/patch-snappy-java_Makefile.common b/unifi6/patches/patch-snappy-java_Makefile.common
deleted file mode 100644
index dc37d525ba..0000000000
--- a/unifi6/patches/patch-snappy-java_Makefile.common
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-snappy-java_Makefile.common,v 1.1 2017/06/24 14:16:37 tnn Exp $
-
-Don't produce a broken shared library.
-
---- ../snappy-java-1.0.5.4/Makefile.common.orig	2014-07-04 05:20:00.000000000 +0000
-+++ ../snappy-java-1.0.5.4/Makefile.common
-@@ -54,7 +54,7 @@ CROSS_PREFIX :=
- Default_CXX          := $(CROSS_PREFIX)g++
- Default_STRIP        := $(CROSS_PREFIX)strip
- Default_CXXFLAGS     := -I$(JAVA_HOME)/include -Ilib/inc_mac -O2 -fPIC -fvisibility=hidden
--Default_LINKFLAGS    := -shared -static
-+Default_LINKFLAGS    := -shared
- Default_LIBNAME      := libsnappyjava.so
- Default_SNAPPY_FLAGS := 
- 


Home | Main Index | Thread Index | Old Index