File:  [cvs.NetBSD.org] / pkgsrc / lang / sun-jre7 / Makefile
Revision 1.28: download - view: text, annotated - select for diffs
Sun Nov 3 19:04:09 2019 UTC (5 years ago) by rillig
Branches: MAIN
CVS tags: pkgsrc-2024Q3-base, pkgsrc-2024Q3, pkgsrc-2024Q2-base, pkgsrc-2024Q2, pkgsrc-2024Q1-base, pkgsrc-2024Q1, pkgsrc-2023Q4-base, pkgsrc-2023Q4, pkgsrc-2023Q3-base, pkgsrc-2023Q3, pkgsrc-2023Q2-base, pkgsrc-2023Q2, pkgsrc-2023Q1-base, pkgsrc-2023Q1, pkgsrc-2022Q4-base, pkgsrc-2022Q4, pkgsrc-2022Q3-base, pkgsrc-2022Q3, pkgsrc-2022Q2-base, pkgsrc-2022Q2, pkgsrc-2022Q1-base, pkgsrc-2022Q1, pkgsrc-2021Q4-base, pkgsrc-2021Q4, pkgsrc-2021Q3-base, pkgsrc-2021Q3, pkgsrc-2021Q2-base, pkgsrc-2021Q2, pkgsrc-2021Q1-base, pkgsrc-2021Q1, pkgsrc-2020Q4-base, pkgsrc-2020Q4, pkgsrc-2020Q3-base, pkgsrc-2020Q3, pkgsrc-2020Q2-base, pkgsrc-2020Q2, pkgsrc-2020Q1-base, pkgsrc-2020Q1, pkgsrc-2019Q4-base, pkgsrc-2019Q4, HEAD
lang: align variable assignments

pkglint -Wall -F --only aligned --only indent -r

No manual corrections.

# $NetBSD: Makefile,v 1.28 2019/11/03 19:04:09 rillig Exp $

# Note: Regen distinfo with PKG_OPTIONS.sun-jre7+=sun-jre-jce
# Note: Update DOWNLOAD_NAME when you update the JRE version
# Note: This needs to be kept in sync with the sun-jdk7 package
# Note: If you make makesum, make sure that you include both archs in distinfo

DISTNAME=	jre-7u${UPDATE_NUMBER}-${DIST_OS}-${DIST_ARCH}
PKGNAME=	sun-jre7-7.0.${UPDATE_NUMBER}
MASTER_SITES=	# empty

LICENSE=	oracle-binary-code-license

DOWNLOAD_NAME=	Java Runtime Environment (JRE) 7u${UPDATE_NUMBER}

USE_TOOLS+=	pax

WRKSRC=		${WRKDIR}/jre1.7.0_${UPDATE_NUMBER}
JAVA_WRAPPERS=	java javaws keytool orbd policytool rmid rmiregistry \
		servertool tnameserv
REQD_DIRS=	${JAVA_HOME}
REQD_DIRS+=	${JAVA_HOME}/lib
REQD_DIRS+=	${JAVA_HOME}/lib/applet
REQD_DIRS+=	${JAVA_HOME}/lib/images
REQD_DIRS+=	${JAVA_HOME}/lib/images/cursors
REQD_DIRS+=	${JAVA_HOME}/lib/security
CONF_FILES=	# empty

.include "../../lang/sun-jre7/Makefile.common"

SFILES_MK=	sfiles-${DIST_OS}-${EMUL_ARCH}.mk

.sinclude "${SFILES_MK}"

# The 64-bit Solaris downloads for some inexplicable reason only contain
# the additional 64-bit files, and you need the main 32-bit file too.
.if ${EMUL_OPSYS} == "solaris" && ${EMUL_ARCH} == "x86_64"
DISTFILES=	${DEFAULT_DISTFILES} ${DEFAULT_DISTFILES:S/x64/i586/}
.endif

.for file in ${SFILES}
CONF_FILES+=	${JAVA_HOME}/lib/${file}.default ${JAVA_HOME}/lib/${file}
.endfor

CHECK_FILES_SKIP+=	${JAVA_HOME}/lib/${JAVA_ARCH}/client/classes.jsa

PKG_OPTIONS_VAR=	PKG_OPTIONS.sun-jre7
PKG_SUPPORTED_OPTIONS=	sun-jre-jce

.include "../../mk/bsd.options.mk"

PLIST_SRC=	PLIST.${DIST_OS}-${EMUL_ARCH}

PLIST_VARS+=	jce native
.if !empty(PKG_OPTIONS:Msun-jre-jce) || make(distinfo)
DISTFILES=	${DISTNAME}${EXTRACT_SUFX} UnlimitedJCEPolicyJDK7.zip
.endif
.if !empty(PKG_OPTIONS:Msun-jre-jce)
PLIST.jce=	yes
FETCH_MESSAGE+=	""
FETCH_MESSAGE+=	"As sun-jre-jce is enabled UnlimitedJCEPolicyJDK7.zip is also needed"
.endif

# Some of the binaries require libX11, so ensure that requirement is
# satisfied when the package is installed on the native OS.
#
.if defined(EMUL_IS_NATIVE) && ${OPSYS} != "SunOS"
.  if ${X11_TYPE} == "native"
X11_LIBDIR=	${X11BASE}/lib${LIBABISUFFIX}
.    if ${SHLIB_TYPE} == "dylib"
X11_LIB=${X11_LIBDIR}/libX11.dylib
.    else
X11_LIB=${X11_LIBDIR}/libX11.so.6
.    endif
.    if !exists(${X11_LIB})
PKG_FAIL_REASON+=	"${X11_LIB} does not exist.  Please install the" \
			"X11 library packages for your system."
.    endif
.  else
.    include "../../x11/libX11/buildlink3.mk"
.    include "../../x11/libXext/buildlink3.mk"
.    include "../../x11/libXi/buildlink3.mk"
.    include "../../x11/libXt/buildlink3.mk"
.    include "../../x11/libXtst/buildlink3.mk"
X11_LIBDIR=	${X11BASE}/lib
.  endif

.  if ${EMUL_OPSYS} == "linux"
.    include "../../audio/alsa-lib/buildlink3.mk"
ALSA_LIBDIR=	${BUILDLINK_PREFIX.alsa-lib}/${BUILDLINK_LIBDIRS.alsa-lib}

.    include "../../databases/unixodbc/buildlink3.mk"
ODBC_LIBDIR=	${BUILDLINK_PREFIX.unixodbc}/${BUILDLINK_LIBDIRS.unixodbc}
.  endif

ARCH_LIBDIR=	${JAVA_HOME}/lib/${JAVA_ARCH}
.PHONY: create-library-symlinks
post-install: create-library-symlinks
create-library-symlinks:
	${RUN}${LN} -fs ${X11_LIBDIR}/libX11.so.6 ${DESTDIR}${ARCH_LIBDIR}
	${RUN}${LN} -fs ${X11_LIBDIR}/libX11.so.6 ${DESTDIR}${ARCH_LIBDIR}/jli
	${RUN}${LN} -fs ${X11_LIBDIR}/libXext.so.6 ${DESTDIR}${ARCH_LIBDIR}
	${RUN}${LN} -fs ${X11_LIBDIR}/libXi.so.6 ${DESTDIR}${ARCH_LIBDIR}
	${RUN}${LN} -fs ${X11_LIBDIR}/libXt.so.6 ${DESTDIR}${ARCH_LIBDIR}
	${RUN}${LN} -fs ${X11_LIBDIR}/libXtst.so.6 ${DESTDIR}${ARCH_LIBDIR}
.  if ${EMUL_OPSYS} == "linux"
	${RUN}${LN} -fs ${ALSA_LIBDIR}/libasound.so.2 ${DESTDIR}${ARCH_LIBDIR}
	${RUN}${LN} -fs ${ODBC_LIBDIR}/libodbc.so ${DESTDIR}${ARCH_LIBDIR}
	${RUN}${LN} -fs ${ODBC_LIBDIR}/libodbcinst.so ${DESTDIR}${ARCH_LIBDIR}
.  endif

PLIST.native=	yes
.endif

post-extract:
	${MKDIR} ${WRKSRC}/.systemPrefs
	${TOUCH} ${WRKSRC}/.systemPrefs/.system.lock
	${TOUCH} ${WRKSRC}/.systemPrefs/.systemRootModFile

do-configure:
	cd ${WRKSRC}/lib; for file in ${SFILES}; do			\
		${MV} -f $$file $$file.default;				\
	done

pre-install:
	# This file is generated the *first* time the package is built on a box
	${RM} -f ${WRKSRC}/lib/servicetag/registration.xml
.if !empty(PKG_OPTIONS:Msun-jre-jce)
	cd ${WRKDIR}/UnlimitedJCEPolicy ; pax -rw -pe -v . ${WRKSRC}/lib/security
.endif

#
# re-create sfiles.mk from properties and config files
#
makesfiles:	extract
	${ECHO} >  ${SFILES_MK:Q} '#	$$Net''BSD$$'
	${ECHO} >> ${SFILES_MK:Q} '#'
	${ECHO} >> ${SFILES_MK:Q} '# Created with "make makesfiles"'
	${ECHO} >> ${SFILES_MK:Q} '# Do not edit this file manually!'
	${ECHO} >> ${SFILES_MK:Q} '#'
	cd ${WRKSRC}/lib && ${FIND} * -name fontconfig.\* -o		\
		-name \*.properties -o -name \*.properties.\?\? -o	\
		-name \*.cfg -o -name \*.security |			\
	${SED} 's/^/SFILES+=	/' >> ${PKGDIR}/${SFILES_MK:Q}

.include "../../mk/bsd.pkg.mk"

CVSweb <webmaster@jp.NetBSD.org>