pkgsrc-WIP-changes archive

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

jitsi-sctp: import version 1.0



Module Name:	pkgsrc-wip
Committed By:	Pierre Pronchery <khorben%defora.org@localhost>
Pushed By:	khorben
Date:		Fri Feb 10 20:29:03 2023 +0100
Changeset:	348e5fda4990a4ffc3d3f5dfdb173cde5c70af26

Modified Files:
	Makefile
Added Files:
	jitsi-sctp/DESCR
	jitsi-sctp/Makefile
	jitsi-sctp/PLIST
	jitsi-sctp/distinfo
	jitsi-sctp/patches/patch-jniwrapper_native_pom.xml

Log Message:
jitsi-sctp: import version 1.0

The jitsi-sctp project creates a JNI wrapper around the usrsctp lib and
provides a set of Java classes to further flesh out a convenient Java SCTP API.

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

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

diffstat:
 Makefile                                           |  1 +
 jitsi-sctp/DESCR                                   |  2 +
 jitsi-sctp/Makefile                                | 63 ++++++++++++++++++++
 jitsi-sctp/PLIST                                   |  1 +
 jitsi-sctp/distinfo                                | 12 ++++
 jitsi-sctp/patches/patch-jniwrapper_native_pom.xml | 68 ++++++++++++++++++++++
 6 files changed, 147 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index a329b1b863..1fd2432bca 100644
--- a/Makefile
+++ b/Makefile
@@ -1840,6 +1840,7 @@ SUBDIR+=	jigasi
 SUBDIR+=	jira-cli-git
 SUBDIR+=	jitsi
 SUBDIR+=	jitsi-meet
+SUBDIR+=	jitsi-sctp
 SUBDIR+=	jlibtool
 SUBDIR+=	jmol
 SUBDIR+=	jmtpfs
diff --git a/jitsi-sctp/DESCR b/jitsi-sctp/DESCR
new file mode 100644
index 0000000000..dbb142da1b
--- /dev/null
+++ b/jitsi-sctp/DESCR
@@ -0,0 +1,2 @@
+The jitsi-sctp project creates a JNI wrapper around the usrsctp lib and
+provides a set of Java classes to further flesh out a convenient Java SCTP API.
diff --git a/jitsi-sctp/Makefile b/jitsi-sctp/Makefile
new file mode 100644
index 0000000000..ed2abe173f
--- /dev/null
+++ b/jitsi-sctp/Makefile
@@ -0,0 +1,63 @@
+# $NetBSD$
+
+GITHUB_TAG=	45bf9f296167f79a52cdc1b0e93bbfa4dc8c4976
+DISTNAME=	jitsi-sctp-1.0
+CATEGORIES=	chat
+MASTER_SITES=	${MASTER_SITE_GITHUB:=jitsi/}
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=	https://github.com/jitsi/jitsi-sctp/
+COMMENT=	JNI wrapper around the usrsctp lib
+LICENSE=	apache-2.0
+
+DISTINFO_FILE=	${.CURDIR}/../../wip/jitsi-sctp/distinfo
+DISTFILES=	${DEFAULT_DISTFILES}
+DISTFILES+=	jitsi-sctp-java-deps-1.0.tar.gz
+DISTFILES+=	usrsctp-c1d6cb3bf4344e01e7d0b3157f4e7103d55b0fbf.tar.gz
+SITES.jitsi-sctp-java-deps-1.0.tar.gz= \
+		ftp://ftp.NetBSD.org/pub/NetBSD/misc/khorben/
+SITES.usrsctp-c1d6cb3bf4344e01e7d0b3157f4e7103d55b0fbf.tar.gz= \
+		-${MASTER_SITE_GITHUB:=sctplab/usrsctp/archive/c1d6cb3bf4344e01e7d0b3157f4e7103d55b0fbf.tar.gz}
+
+USE_LANGUAGES+=	c
+
+USE_TOOLS+=	pax:build
+
+USE_JAVA2=	yes
+
+PKG_JVMS_ACCEPTED=	openjdk8
+
+TOOL_DEPENDS+=	apache-maven-[0-9]*:../../devel/apache-maven
+
+MAVEN_FLAGS+=	-Duser.home=${FAKEHOMEDIR}
+MAVEN_FLAGS+=	-Dmaven.repo.local=${WRKDIR}/deps
+MAVEN_FLAGS+=	--offline
+MAVEN_FLAGS+=	-DskipTests
+MAVEN_FLAGS+=	-Dassembly.skipAssembly=false
+MVN=		mvn ${MAVEN_FLAGS}
+
+.include "../../mk/java-vm.mk"
+
+SUBST_CLASSES+=		java-home
+SUBST_STAGE.java-home=	pre-configure
+SUBST_FILES.java-home=	jniwrapper/native/pom.xml
+SUBST_SED.java-home=	-e 's,@JAVA_HOME@,${PKG_JAVA_HOME},'
+
+.PHONY: create-deps-file
+create-deps-file: build
+	#XXX disable offline mode for maven before using this rule
+	cd ${WRKSRC} && ${MVN} validate
+	cd ${WRKDIR} && \
+		${PAX} -wz -f jitsi-sctp-java-deps-${PKGVERSION_NOREV}.tar.gz deps
+
+post-extract:
+	${MV} ${WRKDIR}/usrsctp-c1d6cb3bf4344e01e7d0b3157f4e7103d55b0fbf \
+		${WRKSRC}/usrsctp/usrsctp
+
+do-build:
+	cd ${WRKSRC} && ${MVN} package -DbuildSctp -DbuildNativeWrapper -DdeployNewJnilib
+
+do-install:
+	cd ${WRKSRC} && ${MVN} install -DbuildSctp -DbuildNativeWrapper -DdeployNewJnilib
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/jitsi-sctp/PLIST b/jitsi-sctp/PLIST
new file mode 100644
index 0000000000..48d96a5493
--- /dev/null
+++ b/jitsi-sctp/PLIST
@@ -0,0 +1 @@
+@comment $NetBSD$
diff --git a/jitsi-sctp/distinfo b/jitsi-sctp/distinfo
new file mode 100644
index 0000000000..0c31b2c9d4
--- /dev/null
+++ b/jitsi-sctp/distinfo
@@ -0,0 +1,12 @@
+$NetBSD$
+
+BLAKE2s (jitsi-sctp-1.0-45bf9f296167f79a52cdc1b0e93bbfa4dc8c4976.tar.gz) = 0c20dbfa58377f9f7d1b9b65ec8dbe092a2c03dcf5a841b2cefa3b041ec7fdcc
+SHA512 (jitsi-sctp-1.0-45bf9f296167f79a52cdc1b0e93bbfa4dc8c4976.tar.gz) = b92bb5d6c78d30cf7980f64fe1c8f4c7c7b002cb5c86660c2e22640a30e46d62e50a1a47ca69a9cffa22f4d732d407a215b5800226438e79c76a6be23609149a
+Size (jitsi-sctp-1.0-45bf9f296167f79a52cdc1b0e93bbfa4dc8c4976.tar.gz) = 2208791 bytes
+BLAKE2s (jitsi-sctp-java-deps-1.0.tar.gz) = d1d827acf82c638f51415a9e89c8f2b52f3f576638671bd982c27128bce87ba8
+SHA512 (jitsi-sctp-java-deps-1.0.tar.gz) = 1937dad8c7c14b270f197db0e898c671b163972febb2b06a05aa4b9122074a9156332a70f96c0ae46c1935414db0194e4e5755da4e83048e090ebd195af024b9
+Size (jitsi-sctp-java-deps-1.0.tar.gz) = 31048490 bytes
+BLAKE2s (usrsctp-c1d6cb3bf4344e01e7d0b3157f4e7103d55b0fbf.tar.gz) = c4a068b591148f3096964f3295d8b811d4dd35c10211a094fbb8353a6cc70fa5
+SHA512 (usrsctp-c1d6cb3bf4344e01e7d0b3157f4e7103d55b0fbf.tar.gz) = 22482fd2db47a1c39491b2fa12d8968e2bee25e5e0ebfc3e912e33a03bf5d7a5bd48b7b5465b9a8e1e19016a680e2ad953b8cf4a1463a633925c0a3eb4288b8b
+Size (usrsctp-c1d6cb3bf4344e01e7d0b3157f4e7103d55b0fbf.tar.gz) = 773282 bytes
+SHA1 (patch-jniwrapper_native_pom.xml) = 6441665117ec81ba6c13d5cb8a03f49ccc9453dd
diff --git a/jitsi-sctp/patches/patch-jniwrapper_native_pom.xml b/jitsi-sctp/patches/patch-jniwrapper_native_pom.xml
new file mode 100644
index 0000000000..333d693578
--- /dev/null
+++ b/jitsi-sctp/patches/patch-jniwrapper_native_pom.xml
@@ -0,0 +1,68 @@
+$NetBSD$
+
+Fix building on NetBSD
+
+--- jniwrapper/native/pom.xml.orig	2022-07-19 21:46:43.000000000 +0000
++++ jniwrapper/native/pom.xml
+@@ -92,6 +92,31 @@
+             </properties>
+         </profile>
+         <profile>
++            <!-- This profile is activated when we're on NetBSD and defines the compiler args we'll use if we're
++            rebuilding the native jniwrapper -->
++            <id>netbsd-args</id>
++            <activation>
++                <os>
++                    <family>unix</family>
++                    <name>netbsd</name>
++                </os>
++            </activation>
++            <properties>
++                <libextension>so</libextension>
++                <linkStartOpts>
++                      -L${project.build.directory}/usrsctp-${project.version}/lib
++                      -shared
++                </linkStartOpts>
++                <linkEndOpts>
++                     -Wl,-Bstatic
++                     -lusrsctp
++                     -Wl,-Bdynamic
++                     -lpthread
++                </linkEndOpts>
++		<nativeLibDir>${os}-${os.arch}</nativeLibDir>
++            </properties>
++        </profile>
++        <profile>
+             <!-- for reasons I don't understand, depending on the JDK version,
+              sometimes ${java.home} ends in ../jre, and sometimes it doesn't.
+              Because the default jdkIncludePath is ${java.home}/../include,
+@@ -150,7 +175,7 @@
+                             <compilerProvider>generic</compilerProvider>
+                             <compilerStartOptions>
+                                 <compilerStartOption>
+-                                    -g -fPIC -std=c99 -O2 -Wall -Itarget/native/javah
++                                    -g -fPIC -std=c99 -O2 -Wall -Itarget/native/javah -I@JAVA_HOME@/include
+                                 </compilerStartOption>
+                             </compilerStartOptions>
+ 
+@@ -208,6 +233,20 @@
+                         <version>1.6.0</version>
+                         <executions>
+                             <execution>
++                                <id>deploy-jnilib-parent-directory</id>
++                                <phase>prepare-package</phase>
++                                <goals><goal>exec</goal></goals>
++                                <configuration>
++                                    <workingDirectory>${project.build.directory}</workingDirectory>
++				    <longModulepath>false</longModulepath>
++                                    <executable>mkdir</executable>
++                                    <arguments>
++                                        <argument>-p</argument>
++                                        <argument>${project.basedir}/src/main/resources/lib/${nativeLibDir}</argument>
++                                    </arguments>
++                                </configuration>
++                            </execution>
++                            <execution>
+                                 <id>deploy-jnilib</id>
+                                 <phase>prepare-package</phase>
+                                 <goals><goal>exec</goal></goals>


Home | Main Index | Thread Index | Old Index