2018-09-09 22:05:19 +02:00
|
|
|
# $NetBSD: Makefile.common,v 1.79 2018/09/09 20:05:19 maya Exp $
|
2003-06-30 09:45:47 +02:00
|
|
|
#
|
2014-10-05 18:41:05 +02:00
|
|
|
# used by x11/xlockmore/Makefile
|
|
|
|
# used by x11/xlockmore-lite/Makefile
|
2003-06-30 09:28:59 +02:00
|
|
|
|
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 09:31:15 +02:00
|
|
|
DISTNAME= xlockmore-5.46
|
2003-06-30 09:28:59 +02:00
|
|
|
CATEGORIES= x11
|
2017-10-09 10:50:24 +02:00
|
|
|
MASTER_SITES= http://sillycycle.com/xlock/
|
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 09:31:15 +02:00
|
|
|
EXTRACT_SUFX= .tar.xz
|
2003-06-30 09:28:59 +02:00
|
|
|
|
2009-10-25 23:54:03 +01:00
|
|
|
MAINTAINER= pkgsrc-users@NetBSD.org
|
2017-10-09 10:50:24 +02:00
|
|
|
HOMEPAGE= http://sillycycle.com/xlockmore.html
|
2003-06-30 09:28:59 +02:00
|
|
|
|
|
|
|
DISTINFO_FILE?= ${.CURDIR}/../xlockmore/distinfo
|
|
|
|
PATCHDIR?= ${.CURDIR}/../xlockmore/patches
|
|
|
|
PLIST_SRC?= ${.CURDIR}/../xlockmore/PLIST
|
2012-03-28 22:21:46 +02:00
|
|
|
FILESDIR?= ${.CURDIR}/../xlockmore/files
|
|
|
|
MESSAGE_SRC?= ${.CURDIR}/../xlockmore/MESSAGE
|
2003-06-30 09:28:59 +02:00
|
|
|
|
2005-12-01 20:17:54 +01:00
|
|
|
.include "../../mk/bsd.prefs.mk"
|
|
|
|
|
|
|
|
PKG_OPTIONS_VAR= PKG_OPTIONS.xlockmore
|
2012-03-11 04:22:09 +01:00
|
|
|
PKG_SUPPORTED_OPTIONS= xlockmore-allow-root xlockmore-dpms pam
|
2005-12-01 20:17:54 +01:00
|
|
|
.if ${OPSYS} == "NetBSD"
|
|
|
|
PKG_SUPPORTED_OPTIONS+= oss
|
|
|
|
.endif
|
|
|
|
PKG_SUGGESTED_OPTIONS= xlockmore-allow-root xlockmore-dpms
|
2005-09-11 18:55:38 +02:00
|
|
|
PKG_OPTIONS_LEGACY_VARS+=XLOCK_DISABLE_ALLOW_ROOT:-xlockmore-allow-root
|
|
|
|
PKG_OPTIONS_LEGACY_VARS+=XLOCK_NO_DPMS:-xlockmore-dpms
|
2005-12-01 20:17:54 +01:00
|
|
|
|
2005-09-11 18:55:38 +02:00
|
|
|
.include "../../mk/bsd.options.mk"
|
|
|
|
|
2004-03-12 20:06:55 +01:00
|
|
|
USE_LANGUAGES= c c++
|
2005-09-18 21:16:49 +02:00
|
|
|
USE_TOOLS+= xmkmf
|
2003-06-30 09:28:59 +02:00
|
|
|
|
|
|
|
XLOCK_SOUNDDIR= ${PREFIX}/lib/X11/xlock/sounds
|
|
|
|
XLOCK_MODULEDIR= ${PREFIX}/lib/X11/xlock/modules
|
|
|
|
|
2005-02-17 08:55:47 +01:00
|
|
|
DEFINES+= -DDEF_MODULEPATH="\"${XLOCK_MODULEDIR}\""
|
2003-06-30 09:28:59 +02:00
|
|
|
CPPFLAGS+= ${DEFINES}
|
|
|
|
CXXFLAGS+= ${DEFINES}
|
|
|
|
|
|
|
|
GNU_CONFIGURE= YES
|
2007-02-22 20:26:05 +01:00
|
|
|
CONFIGURE_ARGS+= --without-motif
|
|
|
|
CONFIGURE_ARGS+= --without-editres
|
|
|
|
CONFIGURE_ARGS+= --without-dtsaver
|
|
|
|
CONFIGURE_ARGS+= --without-rplay
|
|
|
|
CONFIGURE_ARGS+= --without-nas
|
|
|
|
CONFIGURE_ARGS+= --without-gtk
|
2012-02-14 09:24:41 +01:00
|
|
|
CONFIGURE_ARGS+= --without-esound
|
2012-12-14 16:54:30 +01:00
|
|
|
CONFIGURE_ARGS+= --enable-appdefaultdir=${PREFIX}/lib/X11/app-defaults
|
|
|
|
CONFIGURE_ENV+= ac_cv_x_app_defaults=${PREFIX}/lib/X11/app-defaults/XLock
|
2012-12-13 15:31:03 +01:00
|
|
|
|
|
|
|
CONF_FILES+= ${EGDIR}/app-defaults/XLock ${PREFIX}/lib/X11/app-defaults/XLock
|
|
|
|
|
2003-06-30 09:28:59 +02:00
|
|
|
.if ${OPSYS} == "NetBSD"
|
|
|
|
XLOCK_AUDIOPLAY?= /usr/bin/audioplay
|
2005-12-06 00:55:01 +01:00
|
|
|
CONFIGURE_ARGS+= --enable-def-play=${XLOCK_AUDIOPLAY:Q}
|
2003-06-30 09:28:59 +02:00
|
|
|
.endif
|
|
|
|
|
2005-09-11 18:55:38 +02:00
|
|
|
.if empty(PKG_OPTIONS:Mxlockmore-dpms)
|
2003-06-30 09:28:59 +02:00
|
|
|
CONFIGURE_ARGS+= --without-dpms
|
2010-12-08 13:54:30 +01:00
|
|
|
.else
|
|
|
|
. if ${X11_TYPE} != "native" || !exists(${X11BASE}/lib${LIBABISUFFIX}/libXdpms.a)
|
|
|
|
BUILDLINK_TRANSFORM+= l:Xdpms:Xext
|
|
|
|
. endif
|
2018-03-07 12:57:28 +01:00
|
|
|
DPMS_ENV= no_dpms= ac_dpms_includes=${BUILDLINK_PREFIX.xorgproto}/include ac_dpms_libraries=${BUILDLINK_PREFIX.libXext}/lib
|
2010-12-08 13:54:30 +01:00
|
|
|
CONFIGURE_ENV+= ac_cv_path_dpms=${DPMS_ENV:Q}
|
2003-06-30 09:28:59 +02:00
|
|
|
.endif
|
|
|
|
|
2005-09-11 18:55:38 +02:00
|
|
|
.if empty(PKG_OPTIONS:Mxlockmore-allow-root)
|
2005-09-04 19:49:57 +02:00
|
|
|
CONFIGURE_ARGS+= --disable-allow-root
|
|
|
|
.endif
|
|
|
|
|
2012-03-11 04:22:09 +01:00
|
|
|
.if !empty(PKG_OPTIONS:Mpam)
|
|
|
|
. include "../../mk/pam.buildlink3.mk"
|
2012-03-30 09:37:22 +02:00
|
|
|
CONFIGURE_ARGS+= --enable-pam --enable-bad-pam
|
2012-03-11 04:22:09 +01:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --disable-pam
|
|
|
|
.endif
|
|
|
|
|
2007-10-28 17:06:04 +01:00
|
|
|
#
|
|
|
|
# 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
|
|
|
|
|
2012-03-28 22:21:46 +02:00
|
|
|
EGDIR= ${PREFIX}/share/examples/xlock
|
|
|
|
MESSAGE_SUBST+= EGDIR=${EGDIR:Q}
|
|
|
|
INSTALLATION_DIRS+= ${EGDIR}/pam.d
|
|
|
|
|
2012-02-13 12:46:13 +01:00
|
|
|
# XXX framework bug: while we don't need it, this would kill
|
|
|
|
# the inherited full dependency
|
|
|
|
#BUILDLINK_DEPMETHOD.libXt?= build
|
2006-12-27 14:37:35 +01:00
|
|
|
|
|
|
|
.include "../../x11/libICE/buildlink3.mk"
|
|
|
|
.include "../../x11/libSM/buildlink3.mk"
|
2006-11-06 11:04:42 +01:00
|
|
|
.include "../../x11/libX11/buildlink3.mk"
|
2006-12-27 14:37:35 +01:00
|
|
|
.include "../../x11/libXext/buildlink3.mk"
|
2009-11-02 12:51:43 +01:00
|
|
|
.include "../../x11/libXinerama/buildlink3.mk"
|
2006-12-27 14:37:35 +01:00
|
|
|
.include "../../x11/libXt/buildlink3.mk"
|
2018-03-07 12:57:28 +01:00
|
|
|
.include "../../x11/xorgproto/buildlink3.mk"
|
Massive cleanup of buildlink3.mk and builtin.mk files in pkgsrc.
Several changes are involved since they are all interrelated. These
changes affect about 1000 files.
The first major change is rewriting bsd.builtin.mk as well as all of
the builtin.mk files to follow the new example in bsd.builtin.mk.
The loop to include all of the builtin.mk files needed by the package
is moved from bsd.builtin.mk and into bsd.buildlink3.mk. bsd.builtin.mk
is now included by each of the individual builtin.mk files and provides
some common logic for all of the builtin.mk files. Currently, this
includes the computation for whether the native or pkgsrc version of
the package is preferred. This causes USE_BUILTIN.* to be correctly
set when one builtin.mk file includes another.
The second major change is teach the builtin.mk files to consider
files under ${LOCALBASE} to be from pkgsrc-controlled packages. Most
of the builtin.mk files test for the presence of built-in software by
checking for the existence of certain files, e.g. <pthread.h>, and we
now assume that if that file is under ${LOCALBASE}, then it must be
from pkgsrc. This modification is a nod toward LOCALBASE=/usr. The
exceptions to this new check are the X11 distribution packages, which
are handled specially as noted below.
The third major change is providing builtin.mk and version.mk files
for each of the X11 distribution packages in pkgsrc. The builtin.mk
file can detect whether the native X11 distribution is the same as
the one provided by pkgsrc, and the version.mk file computes the
version of the X11 distribution package, whether it's built-in or not.
The fourth major change is that the buildlink3.mk files for X11 packages
that install parts which are part of X11 distribution packages, e.g.
Xpm, Xcursor, etc., now use imake to query the X11 distribution for
whether the software is already provided by the X11 distribution.
This is more accurate than grepping for a symbol name in the imake
config files. Using imake required sprinkling various builtin-imake.mk
helper files into pkgsrc directories. These files are used as input
to imake since imake can't use stdin for that purpose.
The fifth major change is in how packages note that they use X11.
Instead of setting USE_X11, package Makefiles should now include
x11.buildlink3.mk instead. This causes the X11 package buildlink3
and builtin logic to be executed at the correct place for buildlink3.mk
and builtin.mk files that previously set USE_X11, and fixes packages
that relied on buildlink3.mk files to implicitly note that X11 is
needed. Package buildlink3.mk should also include x11.buildlink3.mk
when linking against the package libraries requires also linking
against the X11 libraries. Where it was obvious, redundant inclusions
of x11.buildlink3.mk have been removed.
2005-06-01 20:02:37 +02:00
|
|
|
|
2010-12-08 13:54:30 +01:00
|
|
|
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}
|
|
|
|
|
2003-06-30 09:28:59 +02:00
|
|
|
# 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; \
|
2003-08-21 02:40:38 +02:00
|
|
|
${SED} -e "s|^\(XLock.mode:[ ]*\).*|\1${XLOCK_DEFAULT_MODE}|" \
|
2003-06-30 09:28:59 +02:00
|
|
|
XLock.ad.presed > XLock.ad; \
|
|
|
|
${RM} -f XLock.ad.presed
|
|
|
|
.endif
|
|
|
|
|
|
|
|
post-install:
|
2007-10-28 17:06:04 +01:00
|
|
|
${INSTALL_DATA_DIR} ${DESTDIR}${XLOCK_SOUNDDIR}
|
2003-06-30 09:28:59 +02:00
|
|
|
cd ${WRKSRC}/sounds; \
|
|
|
|
for file in *.au; do \
|
2007-10-28 17:06:04 +01:00
|
|
|
${INSTALL_DATA} $$file ${DESTDIR}${XLOCK_SOUNDDIR}; \
|
2003-06-30 09:28:59 +02:00
|
|
|
done
|
2012-03-28 22:21:46 +02:00
|
|
|
${INSTALL_DATA} ${FILESDIR}/pam-xlock-NetBSD \
|
|
|
|
${DESTDIR}${EGDIR}/pam.d/xlock-NetBSD
|