Bug 119187

Summary: [PATCH] Unbreak russian/xmms (includes two new ports)
Product: Ports & Packages Reporter: Ulrich Spoerlein <uspoerlein>
Component: Individual Port(s)Assignee: Pav Lucistnik <pav>
Status: Closed FIXED    
Severity: Affects Only Me CC: miwi
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
xmms.patch
none
librcd.shar
none
xmms.patch none

Description Ulrich Spoerlein 2007-12-31 11:50:00 UTC
The old encoding patches for xmms 1.2.10 no longer apply to 1.2.11 and have
been split up into multiple patches that rely on at least two external
libraries to make it do something useful. The authors suggest even more
dependencies but I've taken the minimal approach for now.

What's in it:

- Ports for devel/librcc and devel/librcd
- Since the patches for the encoding and id3v2 support are intertwined I
  renamed the knob to WITH_RUSXMMS_PATCHES, mention this in UPDATING (don't
  know if this is really necessary, users of russian/xmms wont have to do
  anything special)
- Since there are patches to Makefile.in/configure.in we need to rerun
  the full autohell stuff [*]

[*] I cannot stress how much I hate this autotools crap with its cryptic
error messages, non-obvious handling and fragile sh/m4/make syntax. 90%
of the time that went into this PR was due to autotools errors.

My New Year's pledge will be to never touch anything related to autotools
again!

Fix: # 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:
#
#	devel/librcc
#	devel/librcc/files
#	devel/librcc/files/patch-configure.in
#	devel/librcc/pkg-descr
#	devel/librcc/Makefile
#	devel/librcc/pkg-plist
#	devel/librcc/distinfo
#
echo c - devel/librcc
mkdir -p devel/librcc > /dev/null 2>&1
echo c - devel/librcc/files
mkdir -p devel/librcc/files > /dev/null 2>&1
echo x - devel/librcc/files/patch-configure.in
sed 's/^X//' >devel/librcc/files/patch-configure.in << 'END-of-devel/librcc/files/patch-configure.in'
X--- configure.in.orig	2007-06-26 21:50:57.000000000 +0200
X+++ configure.in	2007-12-30 13:45:21.995543476 +0100
X@@ -60,8 +60,8 @@
X 
X CFLAGS="$CFLAGS -Wall -Wpointer-arith"
X if test ! -f /usr/include/iconv.h  -a -f /usr/local/include/iconv.h ; then
X-    CFLAGS+=" -I/usr/local/include"
X-    LIBS+=" -L/usr/local/lib"
X+    CFLAGS="$CFLAGS -I/usr/local/include"
X+    LIBS="$LIBS -L/usr/local/lib"
X fi
X 
X dnl Checks for programs.
X@@ -103,7 +103,33 @@
X AC_SUBST(GTK1_LIBS)
X AC_SUBST(GTK1_INCLUDES)
X 
X-PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.0.0, HAVE_GTK2=yes, HAVE_GTK2=no)
X+dnl ***
X+dnl *** GLIB 2.0
X+dnl ***
X+AC_ARG_ENABLE(glib2,
X+	      [  --disable-glib2        disable glib2 [default=enabled]],,
X+	      enable_glib2="yes")
X+
X+if test "x$enable_glib2" = "xyes"; then
X+	PKG_CHECK_MODULES(GLIB2, glib-2.0 >= 2.0.0, HAVE_GLIB2=yes, HAVE_GLIB2=no)
X+else
X+        HAVE_GLIB2=no
X+fi
X+AM_CONDITIONAL(HAVE_GLIB2, [ test $HAVE_GLIB2 = yes ])
X+
X+
X+dnl ***
X+dnl *** GTK 2.0
X+dnl ***
X+AC_ARG_ENABLE(gtk2,
X+	      [  --disable-gtk2        disable gtk2 [default=enabled]],,
X+	      enable_gtk2="yes")
X+
X+if test "x$enable_gtk2" = "xyes"; then
X+	PKG_CHECK_MODULES(GTK2, gtk+-2.0 >= 2.0.0, HAVE_GTK2=yes, HAVE_GTK2=no)
X+else
X+        HAVE_GTK2=no
X+fi
X AM_CONDITIONAL(HAVE_GTK2, [ test $HAVE_GTK2 = yes ])
X 
X AC_CHECK_HEADER(dlfcn.h, [AC_CHECK_LIB(dl, dlopen, [
X@@ -130,12 +156,12 @@
X if test "x$enable_force_system_iconv" != "xyes"; then
X AC_CHECK_LIB(iconv, iconv_open, [
X     EXTERNAL_ICONV=yes
X-    EXTRA_LIBS+=" -liconv"
X+    EXTRA_LIBS="$EXTRA_LIBS -liconv"
X ])
X AC_CHECK_HEADER(libcharset.h, [AC_CHECK_LIB(charset, locale_charset, [
X 	AC_DEFINE(HAVE_LIBCHARSET,1,[Defines if libRCD is available])
X 	HAVE_LIBCHARSET=yes
X-	EXTRA_LIBS+=" -lcharset"
X+	EXTRA_LIBS="$EXTRA_LIBS -lcharset"
X ])])
X fi
X AM_CONDITIONAL(HAVE_LIBCHARSET, [ test "x$HAVE_LIBCHARSET" = "xyes" ])
X@@ -210,23 +236,20 @@
X     BDB_INCLUDES=""
X     HAVE_BDB=no
X else
X-    AX_PATH_BDB([4],[
X-	BDB_LIBS="$BDB_LDFLAGS $BDB_LIBS"
X-	BDB_INCLUDES="$BDB_CPPFLAGS"
X-	HAVE_BDB=yes
X-    ],[
X-	BDB_LIBS=""
X-	BDB_INCLUDES=""
X-	HAVE_BDB=no
X-    ])
X+# Not working on FreeBSD either
X+#    AX_PATH_BDB([4],[
X+#	BDB_LIBS="$BDB_LDFLAGS $BDB_LIBS"
X+#	BDB_INCLUDES="$BDB_CPPFLAGS"
X+#	HAVE_BDB=yes
X+#    ],[
X+#	BDB_LIBS=""
X+#	BDB_INCLUDES=""
X+#	HAVE_BDB=no
X+#    ])
X fi
X AC_SUBST(BDB_LIBS)
X AC_SUBST(BDB_INCLUDES)
X 
X-PKG_CHECK_MODULES(GLIB2, glib-2.0 >= 2.0.0, HAVE_GLIB2=yes, HAVE_GLIB2=no)
X-AM_CONDITIONAL(HAVE_GLIB2, [ test $HAVE_GLIB2 = yes ])
X-
X-
X if test "x$disable_libtranslate" != "xyes"; then
X     HAVE_LIBTRANSLATE=no
X     HAVE_LIBTRANSLATE_TIMED_TRANSLATE=no
X@@ -254,15 +277,25 @@
X fi
X fi
X 
X-AM_PATH_ASPELL([
X-    AC_DEFINE(HAVE_ASPELL,1,[Defines if aspell is available])
X-    HAVE_ASPELL=yes
X-],[
X+# Not available on FreeBSD? breaks autom4te run
X+#AM_PATH_ASPELL([
X+#    AC_DEFINE(HAVE_ASPELL,1,[Defines if aspell is available])
X+#    HAVE_ASPELL=yes
X+#],[
X     HAVE_ASPELL=no
X-])
X+    AC_SUBST(ASPELL_CFLAGS)
X+    AC_SUBST(ASPELL_LIBS)
X+#])
X 
X 
X-PTHREAD_LIBS=error
X+AC_MSG_CHECKING([for PTHREAD_LIBS])
X+if test "x$PTHREAD_LIBS" = "x"; then
X+  PTHREAD_LIBS=error
X+else
X+  AC_MSG_RESULT([$PTHREAD_LIBS])
X+fi
X+
X+if test "x$PTHREAD_LIBS" = "xerror"; then
X AC_EGREP_CPP(yes,[
X #if (defined(__FreeBSD_cc_version) && __FreeBSD_cc_version <= 500001) || defined(__OpenBSD__)
X 	  yes
X@@ -271,6 +304,7 @@
X 	PTHREAD_CFLAGS="-D_THREAD_SAFE" 
X 	PTHREAD_LIBS="-pthread"
X )
X+fi
X if test "x$PTHREAD_LIBS" = "xerror"; then
X 	AC_CHECK_LIB(pthread, pthread_mutex_lock, PTHREAD_LIBS="-lpthread")
X fi
X@@ -309,7 +343,7 @@
X AC_OUTPUT(src/Makefile engines/Makefile external/Makefile ui/Makefile examples/Makefile Makefile librcc.spec)
X 
X rccdir=${pkgdatadir}
X-while expr ${rccdir:0:1} == '$' &>/dev/null; do
X+while expr "${rccdir}" : "\\\$" >/dev/null; do
X     rccdir=`eval echo $rccdir`
X done
X 
END-of-devel/librcc/files/patch-configure.in
echo x - devel/librcc/pkg-descr
sed 's/^X//' >devel/librcc/pkg-descr << 'END-of-devel/librcc/pkg-descr'
XThe Abilities of LibRCC Library
X===============================
X
X    * Language Autodetection
X    * On the fly translation between languages, using online-services!
X    * Encoding Autodetection for most of European Languages1
X    * Support for encoding detection plugins (besides Enca and LibRCD)
X    * Recoding/translation of multi-language playlists!
X    * Cache to speed-up re-recoding.
X    * Possibility to configure new languages and encodings.
X    * Shared configuration file. For example mentioned TagLib and LibID3 patches
X    do not have their own user interface, but will utilize the same recoding
X    configuration as XMMS.
X    * As well the separate program for configuration adjustment is available.
X    * GTK/GTK2 UI Library: you can add properties page to your GTK application
X    with 3 lines of code.
X    * Menu localization opportunity
X
XWWW: http://rusxmms.sourceforge.net
END-of-devel/librcc/pkg-descr
echo x - devel/librcc/Makefile
sed 's/^X//' >devel/librcc/Makefile << 'END-of-devel/librcc/Makefile'
X# New ports collection makefile for:	librcc
X# Date created:			30-12-2007
X# Whom:				Ulrich Spoerlein <uspoerlein@gmail.com>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	librcc
XPORTVERSION=	0.2.5
XCATEGORIES=	devel
XMASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
XMASTER_SITE_SUBDIR= rusxmms
X
XMAINTAINER=	uspoerlein@gmail.com
XCOMMENT=	Library used by rusxmms for language autodetection
X
XUSE_BZIP2=	yes
XGNU_CONFIGURE=	yes
XUSE_GNOME=	gtk12 libxml
XUSE_GMAKE=	yes
XUSE_ICONV=	yes
X
XUSE_AUTOTOOLS=  aclocal:19 automake:19 autoheader:261 autoconf:261
XACLOCAL_ARGS=	--force
XAUTOMAKE_ARGS=	-a
X
XLIB_DEPENDS=	rcd.1:${PORTSDIR}/devel/librcd
X
XCONFIGURE_ARGS=--disable-bdb --disable-gtk2 --disable-glib2
XCONFIGURE_ENV=	CPPFLAGS="-I${LOCALBASE}/include" \
X		LIBS="-L${LOCALBASE}/lib" \
X		PTHREAD_LIBS="${PTHREAD_LIBS}"
X
X.include <bsd.port.mk>
END-of-devel/librcc/Makefile
echo x - devel/librcc/pkg-plist
sed 's/^X//' >devel/librcc/pkg-plist << 'END-of-devel/librcc/pkg-plist'
Xinclude/librcc.h
Xinclude/librccui.h
Xlib/librcc.a
Xlib/librcc.la
Xlib/librcc.so.2
Xlib/librccgtk.a
Xlib/librccgtk.la
Xlib/librccgtk.so.2
Xlib/librccui.a
Xlib/librccui.la
Xlib/librccui.so.2
Xlib/rcc/engines/librcd_engine.a
Xlib/rcc/engines/librcd_engine.la
Xlib/rcc/engines/librcd_engine.so
Xlib/rcc/engines/western_engine.a
Xlib/rcc/engines/western_engine.la
Xlib/rcc/engines/western_engine.so
X@dirrm lib/rcc/engines
X@dirrm lib/rcc
END-of-devel/librcc/pkg-plist
echo x - devel/librcc/distinfo
sed 's/^X//' >devel/librcc/distinfo << 'END-of-devel/librcc/distinfo'
XMD5 (librcc-0.2.5.tar.bz2) = 8dc5e08bf5ae1e029dc464cd74c17f3f
XSHA256 (librcc-0.2.5.tar.bz2) = d46b1bfc8b95ea73b12d9230f4103d18a6c3e2560f5c1d80073f62308b70307e
XSIZE (librcc-0.2.5.tar.bz2) = 494855
END-of-devel/librcc/distinfo
exit
--- librcc.shar ends here ---
Comment 1 Pav Lucistnik freebsd_committer freebsd_triage 2008-01-04 12:53:30 UTC
Espen, can you take a look at the patch at

http://www.freebsd.org/cgi/query-pr.cgi?pr=119187

Do you approve the part of this patch that touch your multimedia/xmms
port?

-- 
Pav Lucistnik <pav@oook.cz>
              <pav@FreeBSD.org>

Bento's Law: If It Can Break, It Will Break
Bento's Corollary: If It Can Break, Kris Can Send Mail About It
Comment 2 Pav Lucistnik freebsd_committer freebsd_triage 2008-01-04 12:53:39 UTC
State Changed
From-To: open->feedback

Asked multimedia/xmms' maintainer approval 


Comment 3 Pav Lucistnik freebsd_committer freebsd_triage 2008-01-04 12:53:39 UTC
Responsible Changed
From-To: freebsd-ports-bugs->pav

Track
Comment 4 dfilter service freebsd_committer freebsd_triage 2008-01-19 19:08:01 UTC
pav         2008-01-19 19:07:57 UTC

  FreeBSD ports repository

  Modified files:
    devel                Makefile 
  Added files:
    devel/librcd         Makefile distinfo pkg-descr pkg-plist 
  Log:
  Library used by ruxmms for autodetection of russian charset
  
  WWW: http://rusxmms.sourceforge.net/
  
  PR:             ports/119187
  Submitted by:   Ulrich Spoerlein <uspoerlein@gmail.comm>
  
  Revision  Changes    Path
  1.2963    +1 -0      ports/devel/Makefile
  1.1       +21 -0     ports/devel/librcd/Makefile (new)
  1.1       +3 -0      ports/devel/librcd/distinfo (new)
  1.1       +3 -0      ports/devel/librcd/pkg-descr (new)
  1.1       +5 -0      ports/devel/librcd/pkg-plist (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 5 dfilter service freebsd_committer freebsd_triage 2008-01-19 19:17:08 UTC
pav         2008-01-19 19:17:03 UTC

  FreeBSD ports repository

  Modified files:
    devel                Makefile 
  Added files:
    devel/librcc         Makefile distinfo pkg-descr pkg-plist 
    devel/librcc/files   patch-configure.in 
  Log:
  The Abilities of LibRCC Library
  ===============================
  
      * Language Autodetection
      * On the fly translation between languages, using online-services!
      * Encoding Autodetection for most of European Languages1
      * Support for encoding detection plugins (besides Enca and LibRCD)
      * Recoding/translation of multi-language playlists!
      * Cache to speed-up re-recoding.
      * Possibility to configure new languages and encodings.
      * Shared configuration file. For example mentioned TagLib and LibID3 patches
      do not have their own user interface, but will utilize the same recoding
      configuration as XMMS.
      * As well the separate program for configuration adjustment is available.
      * GTK/GTK2 UI Library: you can add properties page to your GTK application
      with 3 lines of code.
      * Menu localization opportunity
  
  WWW: http://rusxmms.sourceforge.net
  
  PR:             ports/119187
  Submitted by:   Ulrich Spoerlein <uspoerlein@gmail.com>
  
  Revision  Changes    Path
  1.2964    +1 -0      ports/devel/Makefile
  1.1       +35 -0     ports/devel/librcc/Makefile (new)
  1.1       +3 -0      ports/devel/librcc/distinfo (new)
  1.1       +146 -0    ports/devel/librcc/files/patch-configure.in (new)
  1.1       +19 -0     ports/devel/librcc/pkg-descr (new)
  1.1       +22 -0     ports/devel/librcc/pkg-plist (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 6 Pav Lucistnik freebsd_committer freebsd_triage 2008-01-19 19:27:03 UTC
State Changed
From-To: feedback->open

Feedback timeout
Comment 7 Pav Lucistnik freebsd_committer freebsd_triage 2008-01-19 19:27:11 UTC
State Changed
From-To: open->feedback

Does not configure: 

configure.in:87: error: possibly undefined macro: AC_CHECK_LIB 
If this token and others are legitimate, please use m4_pattern_allow. 
See the Autoconf documentation.
Comment 8 Ulrich Spoerlein 2008-01-20 21:10:37 UTC
On Sat, 19.01.2008 at 19:27:20 +0000, pav@FreeBSD.org wrote:
> Does not configure:
> 
> configure.in:87: error: possibly undefined macro: AC_CHECK_LIB
>       If this token and others are legitimate, please use m4_pattern_allow.
>       See the Autoconf documentation.

Sorry for not testing this in a clean environment. Please see the
attached, additional patch for xmms' Makefile.

When esound happens to not be installed on the system, autoconf will
complain about the missing macros. Patching configure.in on the fly is
not exactly beautiful, but suffices.

Cheers,
Ulrich Spoerlein
Comment 9 Pav Lucistnik freebsd_committer freebsd_triage 2008-01-20 22:41:33 UTC
State Changed
From-To: feedback->closed

Committed, thanks.
Comment 10 dfilter service freebsd_committer freebsd_triage 2008-01-20 22:42:36 UTC
pav         2008-01-20 22:42:32 UTC

  FreeBSD ports repository

  Modified files:
    multimedia/xmms      Makefile distinfo 
    russian/xmms         Makefile 
  Added files:
    multimedia/xmms/files patch-configure.in 
                          patch-po-Makefile.in.in 
  Log:
  - Update russian patches to 1.2.11
  
  PR:             ports/119187
  Submitted by:   Ulrich Spoerlein <uspoerlein@gmail.com>
  Approved by:    maintainer timeout (2 weeks)
  
  Revision  Changes    Path
  1.92      +58 -11    ports/multimedia/xmms/Makefile
  1.24      +3 -0      ports/multimedia/xmms/distinfo
  1.1       +33 -0     ports/multimedia/xmms/files/patch-configure.in (new)
  1.1       +10 -0     ports/multimedia/xmms/files/patch-po-Makefile.in.in (new)
  1.8       +1 -1      ports/russian/xmms/Makefile
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"