1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-23 04:23:08 +00:00

- Fix build with libstatgrab 0.90 by upgrading to 1.0.5

- Use new LIB_DEPENDS format
- Stage support
- Use @sample pkg-plist keyword

PR:		ports/189739
Approved by:	portmgr (antoine)
This commit is contained in:
Tim Bishop 2014-05-24 15:39:56 +00:00
parent 7fe4513846
commit 01469d22ea
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=355045
5 changed files with 49 additions and 44 deletions

View File

@ -2,32 +2,26 @@
# $FreeBSD$
PORTNAME= swapd
PORTVERSION= 1.0.3
PORTREVISION= 1
PORTVERSION= 1.0.5
CATEGORIES= sysutils
MASTER_SITES= http://www.rkeene.org/files/oss/swapd/source/
MASTER_SITES= http://www.rkeene.org/files/oss/swapd/
MAINTAINER= leeym@FreeBSD.org
COMMENT= A daemon that watches free memory and manages swap files
BROKEN= Fails to build
LIB_DEPENDS= statgrab:${PORTSDIR}/devel/libstatgrab
LIB_DEPENDS= libstatgrab.so:${PORTSDIR}/devel/libstatgrab
USES= gmake pkgconfig
GNU_CONFIGURE= yes
USE_RC_SUBR= swapd
MAN5= swapd.conf.5
MAN8= swapd.8
NO_STAGE= yes
post-patch:
@${REINPLACE_CMD} -e "s,%%PREFIX%%,${PREFIX},g" ${WRKSRC}/${CONFIGURE_SCRIPT}
post-install:
.for f in swapd_swapon swapd_swapoff
${INSTALL_SCRIPT} ${FILESDIR}/${f} ${PREFIX}/sbin
${INSTALL_SCRIPT} ${FILESDIR}/${f} ${STAGEDIR}${PREFIX}/sbin
.endfor
.include <bsd.port.mk>

View File

@ -1,2 +1,2 @@
SHA256 (swapd-1.0.3.tar.gz) = 28e61c243268185a60e4012a612c054ebe9fd65215961df5e69fb32735984628
SIZE (swapd-1.0.3.tar.gz) = 90981
SHA256 (swapd-1.0.5.tar.gz) = a9c25251ad4b1eb163266cd44969975db5a872be68cf7bca66367d43875ccbc6
SIZE (swapd-1.0.5.tar.gz) = 94713

View File

@ -1,11 +1,22 @@
--- Makefile.in.orig 2004-10-17 22:05:24.000000000 -0700
+++ Makefile.in 2007-08-24 09:08:55.000000000 -0700
@@ -35,6 +35,7 @@
-$(INSTALL) -d $(mandir)/man8
-$(INSTALL) -d $(mandir)/man5
$(INSTALL) -m 755 swapd$(EXEEXT) $(sbindir)/swapd$(EXEEXT)
--- ./Makefile.in.orig 2004-10-18 06:05:24.000000000 +0100
+++ ./Makefile.in 2013-11-22 22:33:19.141103774 +0000
@@ -30,11 +30,11 @@
rm -f Makefile config.h config.status config.log swapd.8 swapd.conf.5
install: all
- -$(INSTALL) -d $(sbindir)
- -$(INSTALL) -d $(sysconfdir)
- -$(INSTALL) -d $(mandir)/man8
- -$(INSTALL) -d $(mandir)/man5
- $(INSTALL) -m 755 swapd$(EXEEXT) $(sbindir)/swapd$(EXEEXT)
- $(INSTALL) -m 644 swapd.conf $(sysconfdir)/swapd.conf
+ $(INSTALL) -m 644 swapd.conf $(sysconfdir)/swapd.conf.sample
+ if [ ! -f "$(sysconfdir)/swapd.conf" ]; then $(INSTALL) -m 644 swapd.conf $(sysconfdir)/swapd.conf; fi
$(INSTALL) -m 644 swapd.8 $(mandir)/man8/swapd.8
$(INSTALL) -m 644 swapd.conf.5 $(mandir)/man5/swapd.conf.5
- $(INSTALL) -m 644 swapd.8 $(mandir)/man8/swapd.8
- $(INSTALL) -m 644 swapd.conf.5 $(mandir)/man5/swapd.conf.5
+ -$(INSTALL) -d $(DESTDIR)$(sbindir)
+ -$(INSTALL) -d $(DESTDIR)$(sysconfdir)
+ -$(INSTALL) -d $(DESTDIR)$(mandir)/man8
+ -$(INSTALL) -d $(DESTDIR)$(mandir)/man5
+ $(INSTALL) -m 755 swapd$(EXEEXT) $(DESTDIR)$(sbindir)/swapd$(EXEEXT)
+ $(INSTALL) -m 644 swapd.conf $(DESTDIR)$(sysconfdir)/swapd.conf.sample
+ $(INSTALL) -m 644 swapd.8 $(DESTDIR)$(mandir)/man8/swapd.8
+ $(INSTALL) -m 644 swapd.conf.5 $(DESTDIR)$(mandir)/man5/swapd.conf.5

View File

@ -1,23 +1,23 @@
--- configure.orig 2005-02-18 20:34:16.000000000 -0800
+++ configure 2010-06-25 00:26:06.000000000 -0700
@@ -11435,6 +11435,7 @@
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
+eval "$as_ac_var=no"
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
@@ -11535,6 +11536,7 @@
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
--- ./configure.orig 2013-10-06 17:11:43.000000000 +0100
+++ ./configure 2013-11-22 21:48:41.875104078 +0000
@@ -4850,6 +4850,7 @@
for ac_func in swapoff
do :
ac_fn_c_check_func "$LINENO" "swapoff" "ac_cv_func_swapoff"
+ac_cv_func_swapoff=no
if test "x$ac_cv_func_swapoff" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_SWAPOFF 1
@@ -4861,6 +4862,7 @@
ac_fn_c_check_func "$LINENO" "swapon" "ac_cv_func_swapon"
+ac_cv_func_swapon=no
echo "$as_me:$LINENO: result: $ac_cv_func_swapon" >&5
echo "${ECHO_T}$ac_cv_func_swapon" >&6
if test $ac_cv_func_swapon = yes; then
@@ -12170,6 +12172,17 @@
_ACEOF
if test "x$ac_cv_func_swapon" = xyes; then :
@@ -5114,6 +5116,17 @@
$as_echo "#define SWAPD_SWAPOFF_CMDLINE \"/sbin/swapctl -d \\\"%s\\\"\"" >>confdefs.h
;;
+ freebsd*)

View File

@ -1,6 +1,6 @@
man/man5/swapd.conf.5.gz
man/man8/swapd.8.gz
sbin/swapd
sbin/swapd_swapon
sbin/swapd_swapoff
@unexec if cmp -s %D/etc/swapd.conf %D/etc/swapd.conf.sample; then rm -f %D/etc/swapd.conf; fi
etc/swapd.conf.sample
@exec [ ! -f %B/swapd.conf ] && cp %B/%f %B/swapd.conf
@sample etc/swapd.conf.sample