Bug 31229 - new port: astro/linux-setiathome-i686
Summary: new port: astro/linux-setiathome-i686
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-10-12 03:40 UTC by edwin
Modified: 2002-07-28 23:26 UTC (History)
0 users

See Also:


Attachments
file.shar (3.54 KB, text/plain)
2001-10-12 03:40 UTC, edwin
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description edwin 2001-10-12 03:40:00 UTC
	New port, the i686 optimized version of the Linux setiathome.
	From what I've heard and read it's faster than the i386 version.
	It uses the original setiathome-port rc-script, just changes the
	name and a couple of lines in it.

How-To-Repeat: 	n/a
Comment 1 clefevre 2001-10-12 09:54:48 UTC
Edwin Groothuis wrote:
> 
> >Number:         31229
> >Category:       ports
> >Synopsis:       new port: astro/linux-setiathome-i686
> 
> 	New port, the i686 optimized version of the Linux setiathome.
> 	From what I've heard and read it's faster than the i386 version.
> 	It uses the original setiathome-port rc-script, just changes the
> 	name and a couple of lines in it.

I'll see to make this port a setiathome slave port which will avoid
the BUILD_DEPENDS dependency. any objections ?

Cyrille.
-- 
Cyrille Lefevre                 mailto:clefevre@citeweb.net
Comment 2 edwin 2001-10-12 12:31:28 UTC
On Fri, Oct 12, 2001 at 10:54:48AM +0200, Cyrille Lefevre wrote:
> Edwin Groothuis wrote:
> > 
> > >Number:         31229
> > >Category:       ports
> > >Synopsis:       new port: astro/linux-setiathome-i686
> > 
> > 	New port, the i686 optimized version of the Linux setiathome.
> > 	From what I've heard and read it's faster than the i386 version.
> > 	It uses the original setiathome-port rc-script, just changes the
> > 	name and a couple of lines in it.
> 
> I'll see to make this port a setiathome slave port which will avoid
> the BUILD_DEPENDS dependency. any objections ?

No objections from me.

Edwin

-- 
Edwin Groothuis   |              Personal website: http://www.MavEtJu.org
edwin@mavetju.org |           Interested in MUDs? Visit Fatal Dimensions:
------------------+                       http://www.FatalDimensions.org/
Comment 3 clefevre 2001-10-13 20:02:46 UTC
here is the master/slave port version of linux-setiathome-i686.
it seems to install/deinstall well. unfortunately, I can't test
it since I only have a P166...

take care, the first part of this patch set is is a shar archive
relative to ports/astro and the second part a cvs diff of
astro/setiathome.

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	linux-setiathome-i686/Makefile
#	linux-setiathome-i686/distinfo
#	linux-setiathome-i686/pkg-comment
#	linux-setiathome-i686/pkg-descr.inc
#
echo x - linux-setiathome-i686/Makefile
sed 's/^X//' >linux-setiathome-i686/Makefile << 'END-of-linux-setiathome-i686/Makefile'
X# Ports collection makefile for:    linux-setiathome-i686
X# Date created:         13 Oct 2001
X# Whom:                 edwin@mavetju.org
X#
X# $FreeBSD$
X
XCATEGORIES=	astro linux
X
XMAINTAINER=	clefevre@citeweb.net
X
X# Local variables
X#
X
XPORT_CPU=	i686
XPORT_VENDOR=	pc
XPORT_OSNAME=	linux
XPORT_OSREL=	-gnu-gnulibc2.1
X
X# Local overrides
X#
X
XMASTERDIR=	${.CURDIR}/../setiathome
X
X.include "${MASTERDIR}/Makefile"
END-of-linux-setiathome-i686/Makefile
echo x - linux-setiathome-i686/distinfo
sed 's/^X//' >linux-setiathome-i686/distinfo << 'END-of-linux-setiathome-i686/distinfo'
XMD5 (setiathome-3.03.i686-pc-linux-gnu-gnulibc2.1.tar) = ba17d596fd07219c9c0eac4c1d5597a7
END-of-linux-setiathome-i686/distinfo
echo x - linux-setiathome-i686/pkg-comment
sed 's/^X//' >linux-setiathome-i686/pkg-comment << 'END-of-linux-setiathome-i686/pkg-comment'
XDonate idle cycles to the search for space aliens - Linux i686 version
END-of-linux-setiathome-i686/pkg-comment
echo x - linux-setiathome-i686/pkg-descr.inc
sed 's/^X//' >linux-setiathome-i686/pkg-descr.inc << 'END-of-linux-setiathome-i686/pkg-descr.inc'
XThis Linux version is optimized for i686 processors.
END-of-linux-setiathome-i686/pkg-descr.inc
exit

Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/astro/setiathome/Makefile,v
retrieving revision 1.28
diff -u -r1.28 Makefile
--- Makefile	2001/08/24 13:39:27	1.28
+++ Makefile	2001/10/13 18:54:02
@@ -7,7 +7,7 @@
 PORTNAME=	setiathome
 PORTVERSION=	3.03
 PORTREVISION=	3
-CATEGORIES=	astro
+CATEGORIES?=	astro
 MASTER_SITES=	ftp://ftp.cdrom.com/pub/setiathome/ \
 		ftp://alien.ssl.berkeley.edu/pub/ \
 		ftp://setidata.ssl.berkeley.edu/pub/ \
@@ -15,7 +15,7 @@
 DISTNAME=	${PORTNAME}-${PORTVERSION}.${PORT_HOST}
 EXTRACT_SUFX=	.tar
 
-MAINTAINER=	clefevre@citeweb.net
+MAINTAINER?=	clefevre@citeweb.net
 
 .include <bsd.port.pre.mk>
 
@@ -40,7 +40,7 @@
 
 STRIP=		# aout is already stripped
 SCRIPTS_ENV+=	PKG_PREFIX=${PREFIX}
-PLIST_SUB=	X11PORTS=${X11PORTS}
+PLIST_SUB=	X11PORTS=${X11PORTS} PROG_SUFX="${PROG_SUFX}"
 
 MAN1=		${PORTNAME}.1
 
@@ -51,10 +51,10 @@
 # Local variables
 #
 
-PORT_CPU=	${ARCH}
-PORT_VENDOR=	unknown
-PORT_OSNAME=	freebsd
-PORT_OSREL=	2.2.8
+PORT_CPU?=	${ARCH}
+PORT_VENDOR?=	unknown
+PORT_OSNAME?=	freebsd
+PORT_OSREL?=	2.2.8
 PORT_OS=	${PORT_OSNAME}${PORT_OSREL}
 PORT_HOST=	${PORT_CPU}-${PORT_VENDOR}-${PORT_OS}
 
@@ -73,22 +73,51 @@
 #	Warning: Cannot convert string "doneB" to type Widget
 #	Floating point exception (core dumped)
 
-.if ${OSVERSION} < 300000
+# the linux port needs libXawk.so.7 which isn't part of linux_base (6.1).
+# .if ${PORT_OSNAME} != "freebsd" || ${OSVERSION} < 300000
+.if ${PORT_OSNAME} == "freebsd" && ${OSVERSION} < 300000
 MAN1+=		x${PORTNAME}.1
 XBIN_DIR=	${PREFIX}/bin
-XBIN_FILE+=	xsetiathome
+XBIN_FILE=	xsetiathome
 X11PORTS=
 .else
 X11PORTS=	"@comment "
 .endif
 
-#
+.if ${PORT_OSNAME} != "freebsd"
+PKGNAMEPREFIX=	${PORT_OSNAME}-
+PKGNAMESUFFIX=	-${PORT_CPU}
+LOCAL_PKGDIR=	${.CURDIR}
+MD5_FILE=	${LOCAL_PKGDIR}/distinfo
+COMMENT=	${LOCAL_PKGDIR}/pkg-comment
+LOCAL_DESCR_FILE= ${LOCAL_PKGDIR}/pkg-descr.inc
+.if exists(${LOCAL_DESCR_FILE})
+DESCR_FILE=	${PKGDIR}/pkg-descr
+DESCR=		${WRKDIR}/pkg-descr
+.endif
+PROG_SUFX=	-${PORT_OSNAME}-${PORT_CPU}
+.else
+PROG_SUFX=
+.endif
+
+# Post-patch
 #
 
-post-patch: patch-message
+post-patch: patch-descr patch-message
 
+patch-descr:
+.if exists(${LOCAL_DESCR_FILE})
+	@(${GREP} -v WWW: ${DESCR_FILE}; \
+	  ${CAT} ${LOCAL_DESCR_FILE}; \
+	  ${ECHO_MSG}; \
+	  ${GREP} WWW: ${DESCR_FILE}) > ${DESCR}
+.else
+	${CP} ${DESCR_FILE} ${DESCR}
+.endif
+
 patch-message:
-	@${SED} 's|%%PREFIX%%|${PREFIX}|g' ${MSG_FILE} > ${PKGMESSAGE}
+	@${SED} 's|%%PREFIX%%|${PREFIX}|g;s|%%PROG_SUFX%%|${PROG_SUFX}|g' \
+		${MSG_FILE} > ${PKGMESSAGE}
 
 # Install
 #
@@ -96,11 +125,13 @@
 do-install: install-daemon install-program install-man
 
 install-daemon:
-	@${INSTALL_PROGRAM} ${WRKSRC}/${BIN_FILE} ${SBIN_DIR}
+	@${INSTALL_PROGRAM} ${WRKSRC}/${BIN_FILE} \
+		${SBIN_DIR}/${BIN_FILE}${PROG_SUFX}
 
 install-program:
-.if defined(XPROG)
-	@${INSTALL_PROGRAM} ${WRKSRC}/${XBIN_FILE} ${XBIN_DIR}
+.if defined(XBIN_FILE)
+	@${INSTALL_PROGRAM} ${WRKSRC}/${XBIN_FILE} \
+		${XBIN_DIR}/${XBIN_FILE}${PROG_SUFX}
 .endif
 
 install-man:
@@ -120,13 +151,18 @@
 .for file in ${RC_FILES}
 .if exists(${FILESDIR}/rc.${file}.conf)
 	@${INSTALL_DATA} ${FILESDIR}/rc.${file}.conf \
-		${CONF_DIR}/rc.${file}.conf${SAMP_SUFX}
-.if !exists(${CONF_DIR}/rc.${file}.conf)
-	@${INSTALL_DATA} ${FILESDIR}/rc.${file}.conf ${CONF_DIR}
+		${CONF_DIR}/rc.${file}${PROG_SUFX}.conf${SAMP_SUFX}
+.if !exists(${CONF_DIR}/rc.${file}${PROG_SUFX}.conf)
+	@${INSTALL_DATA} ${FILESDIR}/rc.${file}.conf \
+		${CONF_DIR}/rc.${file}${PROG_SUFX}.conf
+.endif
 .endif
+.if !empty(PROG_SUFX)
+	@${CHMOD} -x ${RC_DIR}/${file}*.sh
 .endif
 .if exists(${FILESDIR}/${file}.sh)
-	@${INSTALL_SCRIPT} ${FILESDIR}/${file}.sh ${RC_DIR}
+	@${INSTALL_SCRIPT} ${FILESDIR}/${file}.sh \
+		${RC_DIR}/${file}${PROG_SUFX}.sh
 .endif
 .endfor
 
@@ -137,7 +173,9 @@
 
 display-message:
 .if !defined(BATCH)
+	@${ECHO_MSG}
 	@${CAT} ${PKGMESSAGE}
+	@${ECHO_MSG}
 .endif
 
 .include <bsd.port.post.mk>
Index: pkg-install
===================================================================
RCS file: /home/ncvs/ports/astro/setiathome/pkg-install,v
retrieving revision 1.8
diff -u -r1.8 pkg-install
--- pkg-install	2001/08/24 13:39:27	1.8
+++ pkg-install	2001/10/13 14:06:56
@@ -18,7 +18,7 @@
 seti_maxprocs=$(sysctl -n hw.ncpu)	# max. number of processes to start
 
 rcconf_dir=${PKG_PREFIX}/etc
-rcconf_file=rc.setiathome.conf
+rcconf_file=rc.${PKG_NAME}.conf
 rcconf_path=${rcconf_dir}/${rcconf_file}
 
 if [ -f ${rcconf_path} ]; then
@@ -26,7 +26,7 @@
 fi
 
 rc_dir=${PKG_PREFIX}/etc/rc.d
-rc_file=setiathome.sh
+rc_file=${PKG_NAME}.sh
 rc_path=${rc_dir}/${rc_file}
 
 ncpu=$(sysctl -n hw.ncpu)
Index: pkg-message
===================================================================
RCS file: /home/ncvs/ports/astro/setiathome/pkg-message,v
retrieving revision 1.3
diff -u -r1.3 pkg-message
--- pkg-message	2001/09/03 02:12:06	1.3
+++ pkg-message	2001/10/13 18:46:31
@@ -1,3 +1,3 @@
-****  %%PREFIX%%/etc/rc.setiathome.conf may be edited to tune some startup
-      variables such as `seti_nice' defaulted to 15 and `seti_maxprocs'
-      defaulted to your number of processors.
+****  %%PREFIX%%/etc/rc.setiathome%%PROG_SUFX%%.conf may be edited to
+      tune some startup variables such as `seti_nice' defaulted to 15
+      and `seti_maxprocs' defaulted to your number of processors.
Index: pkg-plist
===================================================================
RCS file: /home/ncvs/ports/astro/setiathome/pkg-plist,v
retrieving revision 1.5
diff -u -r1.5 pkg-plist
--- pkg-plist	2001/08/24 13:39:27	1.5
+++ pkg-plist	2001/10/13 13:45:05
@@ -1,6 +1,6 @@
-sbin/setiathome
-@unexec if cmp -s %D/etc/rc.setiathome.conf %D/etc/rc.setiathome.conf.sample; then rm -f %D/etc/rc.setiathome.conf; fi
-etc/rc.setiathome.conf.sample
-@exec [ -f %D/etc/rc.setiathome.conf ] || cp %D/etc/rc.setiathome.conf.sample %D/etc/rc.setiathome.conf
-etc/rc.d/setiathome.sh
-%%X11PORTS%%bin/xsetiathome
+sbin/setiathome%%PROG_SUFX%%
+@unexec if cmp -s %D/etc/rc.setiathome%%PROG_SUFX%%.conf %D/etc/rc.setiathome%%PROG_SUFX%%.conf.sample; then rm -f %D/etc/rc.setiathome%%PROG_SUFX%%.conf; fi
+etc/rc.setiathome%%PROG_SUFX%%.conf.sample
+@exec [ -f %D/etc/rc.setiathome%%PROG_SUFX%%.conf ] || cp %D/etc/rc.setiathome%%PROG_SUFX%%.conf.sample %D/etc/rc.setiathome%%PROG_SUFX%%.conf
+etc/rc.d/setiathome%%PROG_SUFX%%.sh
+%%X11PORTS%%bin/xsetiathome%%PROG_SUFX%%
Index: files/setiathome.sh
===================================================================
RCS file: /home/ncvs/ports/astro/setiathome/files/setiathome.sh,v
retrieving revision 1.8
diff -u -r1.8 setiathome.sh
--- files/setiathome.sh	2001/09/03 02:12:10	1.8
+++ files/setiathome.sh	2001/10/13 18:42:15
@@ -32,7 +32,7 @@
 fi
 
 program_dir=${PREFIX}/sbin
-program_file=setiathome
+program_file=${rc_file%.sh}
 program_path=${program_dir}/${program_file}
 
 syslog_facility=daemon.err
@@ -72,7 +72,7 @@
 				 ${seti_std_args} ${seti_proxy_args} \
 				 ${seti_nice:+-nice} ${seti_nice} >/dev/null &)"
 	done
-	echo -n " SETI@home"
+	echo -n " SETI@home${program_file#${program_file%%-*}}"
 	;;
 
 stop)

Cyrille.
-- 
Cyrille Lefevre                 mailto:clefevre@citeweb.net
Comment 4 edwin 2001-11-21 02:26:55 UTC
On Sat, Oct 13, 2001 at 12:10:02PM -0700, Cyrille Lefevre wrote:
> The following reply was made to PR ports/31229; it has been noted by GNATS.
> 
> From: Cyrille Lefevre <clefevre@citeweb.net>
> To: Edwin Groothuis <edwin@mavetju.org>
> Cc: FreeBSD-gnats-submit@freebsd.org
> Subject: Re: ports/31229: new port: astro/linux-setiathome-i686
> Date: Sat, 13 Oct 2001 21:02:46 +0200 (CEST)
> 
>  here is the master/slave port version of linux-setiathome-i686.
>  it seems to install/deinstall well. unfortunately, I can't test
>  it since I only have a P166...

I euh.. I honestly don't like the link between the two packages.
I agree that they could be linked together, because they're both
coming from the same source and are the same kind of application.
But because of the possibilities of having unsynced versions (for
example for MacOS/X they are at version 3.05 while the rest of the
world is at 3.03) I would prefer it to keep the two ports seperated.

Edwin

-- 
Edwin Groothuis   |              Personal website: http://www.MavEtJu.org
edwin@mavetju.org |           Interested in MUDs? Visit Fatal Dimensions:
------------------+                       http://www.FatalDimensions.org/
Comment 5 Cyrille Lefevre 2002-06-30 01:59:59 UTC
Hi,

unsynced versions aren't a problem, just add PORTVERSION (and
maybe PORTREVISION=0) to the linux Makefile and go on.

this PR depends on PR #40022 :
	http://www.FreeBSD.org/cgi/query-pr.cgi?pr=ports/40022

also tested w/ PORT_CPU=i386.

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	linux-setiathome/Makefile
#	linux-setiathome/distinfo
#	linux-setiathome/pkg-comment
#	linux-setiathome/pkg-descr
#
echo x - linux-setiathome/Makefile
sed 's/^X//' >linux-setiathome/Makefile << 'END-of-linux-setiathome/Makefile'
X# Ports collection makefile for:    linux-setiathome-i686
X# Date created:         13 Oct 2001
X# Whom:                 edwin@mavetju.org
X#
X# $FreeBSD$
X
XCATEGORIES=	astro linux
X
XMAINTAINER=	cyrille.lefevre@laposte.net
X
X# Global variables
X#
X
XONLY_FOR_ARCHS=	i386
XUSE_LINUX=	yes
X
X# Local variables
X#
X
XPORT_CPU?=	i686
XPORT_VENDOR=	pc
XPORT_OSNAME=	linux
XPORT_OSREL=	-gnu-gnulibc2.1
X
X# Local overrides
X#
X
XMASTERDIR=	${.CURDIR}/../setiathome
X
X.include "${MASTERDIR}/Makefile"
END-of-linux-setiathome/Makefile
echo x - linux-setiathome/distinfo
sed 's/^X//' >linux-setiathome/distinfo << 'END-of-linux-setiathome/distinfo'
XMD5 (setiathome-3.03.i686-pc-linux-gnu-gnulibc2.1.tar) = ba17d596fd07219c9c0eac4c1d5597a7
END-of-linux-setiathome/distinfo
echo x - linux-setiathome/pkg-comment
sed 's/^X//' >linux-setiathome/pkg-comment << 'END-of-linux-setiathome/pkg-comment'
XDonate idle cycles to the search for space aliens - Linux i686 version
END-of-linux-setiathome/pkg-comment
echo x - linux-setiathome/pkg-descr
sed 's/^X//' >linux-setiathome/pkg-descr << 'END-of-linux-setiathome/pkg-descr'
XSETI@home is a scientific experiment that will harness the power of
Xhundreds of thousands of Internet-connected computers in the Search for
XExtraterrestrial Intelligence (SETI).  You can participate by running a
Xprogram that downloads and analyzes radio telescope data.  There's a
Xsmall but captivating possibility that your computer will detect the
Xfaint murmur of a civilization beyond Earth.
X
XThis Linux version is optimized for i686 processors.
X
XWWW: http://setiathome.ssl.berkeley.edu/
END-of-linux-setiathome/pkg-descr
exit

Cyrille.
-- 
Cyrille Lefevre                 mailto:cyrille.lefevre@laposte.net
Comment 6 Christian Weisgerber freebsd_committer freebsd_triage 2002-07-28 23:25:27 UTC
State Changed
From-To: open->closed

Final version imported, thanks!