freebsd-ports/math/libjbigi/Makefile
Mathieu Arnold 60d1a83c2a MASTER_SITES cleanup.
- Replace ${MASTER_SITE_FOO} with FOO.
- Merge MASTER_SITE_SUBDIR into MASTER_SITES when possible. (This means 99.9%
  of the time.)
- Remove occurrences of MASTER_SITE_LOCAL when no subdirectory was present and
  no hint of what it should be was present.
- Fix some logic.
- And generally, make things more simple and easy to understand.

While there, add magic values to the FESTIVAL, GENTOO, GIMP, GNUPG, QT and
SAMBA macros.

Also, replace some EXTRACT_SUFX occurences with USES=tar:*.

Checked by:	make fetch-urlall-list
With hat:	portmgr
Sponsored by:	Absolight
2015-05-14 10:15:04 +00:00

77 lines
1.7 KiB
Makefile

# Created by: Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org>
# $FreeBSD$
PORTNAME= libjbigi
PORTVERSION= 0.8.7
CATEGORIES= math java
MASTER_SITES= http://mirror.i2p2.de/ \
GOOGLE_CODE
DISTNAME= i2psource_${PORTVERSION}
MAINTAINER= ports@FreeBSD.org
COMMENT= i2p JNI to GNU MP Bignum library (libgmp)
LIB_DEPENDS= libgmp.so:${PORTSDIR}/math/gmp
USES= tar:bzip2
USE_JAVA= yes
JAVA_BUILD= jdk
JAVA_VERSION= 1.6+
JAVA_OS= native
PROJECTHOST= i2p
WRKSRC= ${WRKDIR}/i2p-${PORTVERSION}/core/c
PLIST_FILES= %%JAVAJARDIR%%/jbigi.jar
JBIGI_BUILD_ENV= \
CC="${CC}" \
CFLAGS="${CFLAGS} -fPIC -DPIC" \
LDFLAGS="${LDFLAGS}" \
JAVA_HOME="${JAVA_HOME}" \
LOCALBASE="${LOCALBASE}"
JBIGI_LIBS= \
libjbigi-freebsd-none.so
do-install:
@${INSTALL_DATA} ${WRKSRC}/jbigi.jar \
${STAGEDIR}${JAVAJARDIR}
.include <bsd.port.pre.mk>
.if ${ARCH} == "i386"
JBIGI_BUILD_JCPUID= yes
.endif
.if ${ARCH} == "i386" || ${ARCH} == "amd64"
JBIGI_LIBS+= libjbigi-freebsd-x86.so
.endif
do-build:
## build JNI
.ifdef(JBIGI_BUILD_JCPUID)
# jcpuid
cd ${BUILD_WRKSRC}/jcpuid && \
${SETENV} ${JBIGI_BUILD_ENV} \
${SH} ./build.sh
.endif
# jbigi
cd ${BUILD_WRKSRC}/jbigi && \
${SETENV} ${JBIGI_BUILD_ENV} \
${SH} ./build_jbigi.sh dynamic
## prepare jar
.ifdef(JBIGI_BUILD_JCPUID)
# jcpuid
@${MKDIR} ${WRKSRC}/t/freenet/support/CPUInformation/
@${CP} ${WRKSRC}/jcpuid/lib/freenet/support/CPUInformation/*jcpuid* \
${WRKSRC}/t/freenet/support/CPUInformation/
.endif
# jbigi
@${MKDIR} ${WRKSRC}/t/net/i2p/util
.for lib in ${JBIGI_LIBS}
@${CP} ${WRKSRC}/jbigi/libjbigi.so \
${WRKSRC}/t/net/i2p/util/${lib}
.endfor
@cd ${WRKSRC}/t && ${JAR} cf ../jbigi.jar .
.include <bsd.port.post.mk>