pkgsrc/x11/xlockmore/Makefile.common
spz c036d7beea Update of xlockmore and xlockmore-lite to the latest version.
Upstream changelog:

xlockmore-5.46 as of 10 March 2015, the maintained version of xlock

5.46
  xmb fonts messing up password screen since ascent was not being set
    correctly.  Also fixed xjack mode.
  Updated language use in xlock.c, now removed to .h files.  If I made some
    bad assumption about the language... let me know.
  BSD install fixes (DESTDIR, FreeType2, fortune) and switching to xz.
  Cygwin install fixes (cygport, xlockrc).

5.45
  A bad value of fnt for pyro2 could cause to give an X error.  Fixed to
    not free memory we are using and have a better default.

5.44
  Fix for make_one_sided_pentomino was using 18 as basis for 2 sided
    pentominoes in loop.  Found out about it by gcc 4.8.1 warning: iteration
    12u invokes undefined behavior [-Waggressive-loop-optimizations].
  dilemma, voters, wator size fix for neighbors = 6.
  Proper crediting of Nathan Thompson for discovering High Life part of
    life mode.
  A few new gliders and patterns for life and life3d.
  Updated win32 to use updated cygwin.  Currently links are only satisfied
    using cygwin using 32-bit installation.  For me, cross compiling using
    64-bit gave undefined references in visgl.c and xlock.c.
  magick.c update for version 7, thanks to Jouk Jansen.

5.43
  life3d: added new rule B58S58, which has a replicator.
  -e added to shell in Makefile.in, told it should now stop on build errors,
    rather than trying to continue which could be confusing.  Thanks to
    Glyn Kennington <glyn AT potatojunkie.co.uk>.
  If crypt fails (which is possible with glibc2.17) it could cause xlock to
    get a signal 11.  There is now protection around the strcmp() to prevent
    NULL poiter dereferences thanks to Mancha <mancha1 AT hush.com>.

5.42
  USE_MB now defined by default. If this is not defined it can only
    correctly display ASCII.  There could be font issues which may
    lead one to want only ASCII (if so use configure --disable_mb).
    Also looked into Xutf8 but did not see any benefit this had over Xmb.
    Password window and the following modes: bomb,dclock,image,marquee,nose
    are affected.  Fixed a few problems with marquee for width, height, and
    if a character needs more than 2 bytes.
  In Cygwin a seemingly unrelated fix where USE_MB gets defined in xlock.h.
    An #undef was added in xlock.h, if USE_MB gets defined in an internal
    include file.
  -lcrypt added to modes/Makefile.in.  This is needed on my Linux Ubuntu
    and seems ok on Cygwin where it was not needed.  (If this causes a
    problem remove from modes/Makefile).  Also tested on FreeBSD.
  cppcheck fixes
    passwd.c: passcpy could be freed twice
    iostuff.c: could have left file open
    ras.c: leak if mem fails
    resource.c: check if malloc succeeded was in wrong spot
    sound.c: ESound, a redundant check
    memcheck.c: continuing after memory failure
    dclock: problem with parens in ifdefs
    rain: leak fix ( :) )
    t3d: uninitialized time1 (unlikely but fixed anyway)
    molecule: leak if mem fails
    text3d: leak if nothing to draw
2015-04-15 07:31:15 +00:00

140 lines
4.4 KiB
Text

# $NetBSD: Makefile.common,v 1.73 2015/04/15 07:31:15 spz Exp $
#
# used by x11/xlockmore/Makefile
# used by x11/xlockmore-lite/Makefile
DISTNAME= xlockmore-5.46
CATEGORIES= x11
MASTER_SITES= http://www.tux.org/~bagleyd/xlock/ \
ftp://ibiblio.org/pub/Linux/X11/screensavers/
EXTRACT_SUFX= .tar.xz
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://www.tux.org/~bagleyd/xlockmore.html
CONFLICTS+= xlockmore-[0-9]* xlockmore-lite-[0-9]*
DISTINFO_FILE?= ${.CURDIR}/../xlockmore/distinfo
PATCHDIR?= ${.CURDIR}/../xlockmore/patches
PLIST_SRC?= ${.CURDIR}/../xlockmore/PLIST
FILESDIR?= ${.CURDIR}/../xlockmore/files
MESSAGE_SRC?= ${.CURDIR}/../xlockmore/MESSAGE
.include "../../mk/bsd.prefs.mk"
PKG_OPTIONS_VAR= PKG_OPTIONS.xlockmore
PKG_SUPPORTED_OPTIONS= xlockmore-allow-root xlockmore-dpms pam
.if ${OPSYS} == "NetBSD"
PKG_SUPPORTED_OPTIONS+= oss
.endif
PKG_SUGGESTED_OPTIONS= xlockmore-allow-root xlockmore-dpms
PKG_OPTIONS_LEGACY_VARS+=XLOCK_DISABLE_ALLOW_ROOT:-xlockmore-allow-root
PKG_OPTIONS_LEGACY_VARS+=XLOCK_NO_DPMS:-xlockmore-dpms
.include "../../mk/bsd.options.mk"
USE_LANGUAGES= c c++
USE_TOOLS+= xmkmf
USE_X11BASE= YES
XLOCK_SOUNDDIR= ${PREFIX}/lib/X11/xlock/sounds
XLOCK_MODULEDIR= ${PREFIX}/lib/X11/xlock/modules
DEFINES+= -DDEF_MODULEPATH="\"${XLOCK_MODULEDIR}\""
CPPFLAGS+= ${DEFINES}
CXXFLAGS+= ${DEFINES}
GNU_CONFIGURE= YES
CONFIGURE_ARGS+= --without-motif
CONFIGURE_ARGS+= --without-editres
CONFIGURE_ARGS+= --without-dtsaver
CONFIGURE_ARGS+= --without-rplay
CONFIGURE_ARGS+= --without-nas
CONFIGURE_ARGS+= --without-gtk
CONFIGURE_ARGS+= --without-esound
CONFIGURE_ARGS+= --enable-appdefaultdir=${PREFIX}/lib/X11/app-defaults
CONFIGURE_ENV+= ac_cv_x_app_defaults=${PREFIX}/lib/X11/app-defaults/XLock
CONF_FILES+= ${EGDIR}/app-defaults/XLock ${PREFIX}/lib/X11/app-defaults/XLock
.if ${OPSYS} == "NetBSD"
XLOCK_AUDIOPLAY?= /usr/bin/audioplay
CONFIGURE_ARGS+= --enable-def-play=${XLOCK_AUDIOPLAY:Q}
.endif
.if empty(PKG_OPTIONS:Mxlockmore-dpms)
CONFIGURE_ARGS+= --without-dpms
.else
. if ${X11_TYPE} != "native" || !exists(${X11BASE}/lib${LIBABISUFFIX}/libXdpms.a)
BUILDLINK_TRANSFORM+= l:Xdpms:Xext
. endif
DPMS_ENV= no_dpms= ac_dpms_includes=${BUILDLINK_PREFIX.xextproto}/include ac_dpms_libraries=${BUILDLINK_PREFIX.libXext}/lib
CONFIGURE_ENV+= ac_cv_path_dpms=${DPMS_ENV:Q}
.endif
.if empty(PKG_OPTIONS:Mxlockmore-allow-root)
CONFIGURE_ARGS+= --disable-allow-root
.endif
.if !empty(PKG_OPTIONS:Mpam)
. include "../../mk/pam.buildlink3.mk"
CONFIGURE_ARGS+= --enable-pam --enable-bad-pam
.else
CONFIGURE_ARGS+= --disable-pam
.endif
#
# Special permissions of bin/xlock if any.
#
.if ${OPSYS} == "FreeBSD" || ${OPSYS} == "NetBSD" || ${OPSYS} == "OpenBSD" || \
${OPSYS} == "DragonFly" || ${OPSYS} == "SunOS"
SPECIAL_PERMS+= bin/xlock ${SETUID_ROOT_PERMS}
.elif ${OPSYS} == "Linux"
# setgid shadow should be enough for modern Linux
SPECIAL_PERMS+= bin/xlock ${REAL_ROOT_USER} shadow 2511
.endif
EGDIR= ${PREFIX}/share/examples/xlock
MESSAGE_SUBST+= EGDIR=${EGDIR:Q}
INSTALLATION_DIRS+= ${EGDIR}/pam.d
# XXX framework bug: while we don't need it, this would kill
# the inherited full dependency
#BUILDLINK_DEPMETHOD.libXt?= build
.include "../../x11/libICE/buildlink3.mk"
.include "../../x11/libSM/buildlink3.mk"
.include "../../x11/libX11/buildlink3.mk"
.include "../../x11/libXext/buildlink3.mk"
.include "../../x11/libXinerama/buildlink3.mk"
.include "../../x11/libXt/buildlink3.mk"
.include "../../x11/xextproto/buildlink3.mk"
XINERAMA_ENV= no_xenerama= ac_xinerama_includes=${BUILDLINK_PREFIX.libXinerama}/include ac_xinerama_libraries=${BUILDLINK_PREFIX.libXinerama}/lib
CONFIGURE_ENV+= ac_cv_path_xinerama=${XINERAMA_ENV:Q}
# Set the complete paths to the sound files and set the default xlock
# mode/screensaver.
#
post-patch:
cd ${WRKSRC}/xlock; \
${MV} -f XLock.ad XLock.ad.presed; \
${SED} -e "s|/usr/lib/|${PREFIX}/lib/|g" \
XLock.ad.presed > XLock.ad; \
${RM} -f XLock.ad.presed
.if defined(XLOCK_DEFAULT_MODE) && !empty(XLOCK_DEFAULT_MODE)
cd ${WRKSRC}/xlock; \
${MV} -f XLock.ad XLock.ad.presed; \
${SED} -e "s|^\(XLock.mode:[ ]*\).*|\1${XLOCK_DEFAULT_MODE}|" \
XLock.ad.presed > XLock.ad; \
${RM} -f XLock.ad.presed
.endif
post-install:
${INSTALL_DATA_DIR} ${DESTDIR}${XLOCK_SOUNDDIR}
cd ${WRKSRC}/sounds; \
for file in *.au; do \
${INSTALL_DATA} $$file ${DESTDIR}${XLOCK_SOUNDDIR}; \
done
${INSTALL_DATA} ${FILESDIR}/pam-xlock-NetBSD \
${DESTDIR}${EGDIR}/pam.d/xlock-NetBSD