On Wed, Aug 17, 2016 at 08:12:31PM +0200, Joerg Jung wrote:

> > Notables changes:
> > 
> > - Project moved to GitHub so fetch distfile from there
> > - Changed comment to a more accurate description
> > - Release tarball doesn't bundle a configure script, so the port now
> >   uses autoconf + automake, with patched configure.ac (comment in file)
> > - Use upstream Makefile install target, as it also installs manpage
> > - Add patches to fix two build errors
> 
> The log2 patch looks a bit suspicious, any chance to fix the configure
> check for it instead?

Indeed, fixing the configure check is cleaner :) Here is a new diff with
only two patches.

Index: Makefile
===================================================================
RCS file: /cvs/ports/audio/schismtracker/Makefile,v
retrieving revision 1.4
diff -u -p -u -p -r1.4 Makefile
--- Makefile    25 Aug 2015 13:18:24 -0000      1.4
+++ Makefile    21 Aug 2016 21:54:19 -0000
@@ -1,30 +1,39 @@
 # $OpenBSD: Makefile,v 1.4 2015/08/25 13:18:24 sthen Exp $
 
-COMMENT =      free module tracker editor and player
-DISTNAME =     schismtracker-20150425
-EXTRACT_SUFX = .tar.bz2
+COMMENT =      open-source reimplementation of Impulse Tracker
+
+GH_ACCOUNT =   schismtracker
+GH_PROJECT =   schismtracker
+GH_TAGNAME =   20160521
+
 CATEGORIES =   audio x11
-REVISION =     0
 
 HOMEPAGE =     http://schismtracker.org/
 
+MAINTAINER =   Frederic Cambus <[email protected]>
+
 # GPLv2+
 PERMIT_PACKAGE_CDROM = Yes
 
-WANTLIB += SDL X11 Xext Xv c m pthread
-
-MASTER_SITES = http://mirrors.nycbug.org/pub/distfiles/
+WANTLIB +=     SDL X11 Xext Xv c m pthread
 
 MODULES =      lang/python
 
 MODPY_RUNDEP = No
 
+BUILD_DEPENDS =        ${MODGNU_AUTOCONF_DEPENDS} \
+               ${MODGNU_AUTOMAKE_DEPENDS}
+
 LIB_DEPENDS =  devel/sdl
 
 CONFIGURE_STYLE =      gnu
-CONFIGURE_ARGS =       --disable-mercurial
+AUTOCONF_VERSION =     2.69
+AUTOMAKE_VERSION =     1.15
 
-do-install:
-       ${INSTALL_PROGRAM} ${WRKSRC}/schismtracker ${PREFIX}/bin
+pre-configure:
+       @cd ${WRKSRC} && \
+       AUTOCONF_VERSION=${AUTOCONF_VERSION} \
+       AUTOMAKE_VERSION=${AUTOMAKE_VERSION} \
+       autoreconf -i
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/audio/schismtracker/distinfo,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 distinfo
--- distinfo    1 Jul 2015 00:07:08 -0000       1.2
+++ distinfo    21 Aug 2016 21:54:19 -0000
@@ -1,2 +1,2 @@
-SHA256 (schismtracker-20150425.tar.bz2) = 
vBBkpG67SATMuPHsVTvXAwkG6ou1zpb4Ne4GW7QOXSU=
-SIZE (schismtracker-20150425.tar.bz2) = 1276317
+SHA256 (schismtracker-20160521.tar.gz) = 
n0kCjb98kP0KnwxmS0fkecgebU90aoYkqY3mUTkR2TA=
+SIZE (schismtracker-20160521.tar.gz) = 1026780
Index: patches/patch-Makefile_am
===================================================================
RCS file: patches/patch-Makefile_am
diff -N patches/patch-Makefile_am
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-Makefile_am   21 Aug 2016 21:54:19 -0000
@@ -0,0 +1,15 @@
+$OpenBSD$
+
+OpenBSD doesn't need libdl
+
+--- Makefile.am.orig   Sat May 21 16:40:41 2016
++++ Makefile.am        Sat Aug 13 21:17:33 2016
+@@ -358,8 +358,3 @@ AM_OBJCFLAGS = $(AM_CFLAGS)
+ 
+ schismtracker_DEPENDENCIES = $(files_windres)
+ schismtracker_LDADD = $(lib_asound) $(lib_win32) $(SDL_LIBS) $(LIBM)
+-
+-if ! USE_WIN32
+-schismtracker_LDADD += -ldl
+-endif
+-
Index: patches/patch-configure_ac
===================================================================
RCS file: patches/patch-configure_ac
diff -N patches/patch-configure_ac
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-configure_ac  21 Aug 2016 21:54:19 -0000
@@ -0,0 +1,27 @@
+$OpenBSD$
+
+- Prevent calling Git to obtain date of the last commit, and hardcode
+  [last_git_commit] value to match package version
+- Fix log2() function detection
+
+--- configure.ac.orig  Sat May 21 16:40:41 2016
++++ configure.ac       Fri Aug 19 22:54:30 2016
+@@ -21,9 +21,7 @@ dnl You should have received a copy of the GNU General
+ dnl along with this program; if not, write to the Free Software
+ dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ 
+-dnl PACKAGE_VERSION will be either " " if not using git, or date of the last 
git commit in the form YYYYMMDD
+-m4_define([last_git_commit], patsubst(m4_esyscmd([git log -n 1 --date=short 
--format=format:%cd]), [[^0-9]]))
+-AC_INIT([schismtracker], [last_git_commit])
++AC_INIT([schismtracker], [20160521])
+ 
+ AC_CONFIG_SRCDIR([schism/main.c])
+ 
+@@ -58,6 +56,7 @@ dnl Check for SDL libs
+ AM_PATH_SDL(1.2.10, , AC_MSG_ERROR([*** SDL version >= 1.2.10 not found.]))
+ 
+ dnl Functions
++AC_CHECK_LIB([m], [log2])
+ AC_CHECK_FUNCS(strchr memmove strerror strtol strcasecmp strncasecmp 
strverscmp stricmp strnicmp strcasestr strptime asprintf vasprintf memcmp mmap 
nice unsetenv dup fnmatch log2 mkstemp)
+ AM_CONDITIONAL([NEED_ASPRINTF], [test "$ac_cv_func_asprintf" = "no"])
+ AM_CONDITIONAL([NEED_VASPRINTF], [test "$ac_cv_func_vasprintf" = "no"])
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/audio/schismtracker/pkg/PLIST,v
retrieving revision 1.1.1.1
diff -u -p -u -p -r1.1.1.1 PLIST
--- pkg/PLIST   13 Nov 2013 01:09:51 -0000      1.1.1.1
+++ pkg/PLIST   21 Aug 2016 21:54:19 -0000
@@ -1,2 +1,3 @@
 @comment $OpenBSD: PLIST,v 1.1.1.1 2013/11/13 01:09:51 bcallah Exp $
 @bin bin/schismtracker
+@man man/man1/schismtracker.1

Reply via email to