Commits

Lee Pak Hong  committed 51d937a

Change libmusicbrainz as version 2

Signed-off-by: Lee Pak Hong <benreilly@vector.Linux.net>

  • Participants
  • Parent commits fc1ac9c
  • Branches veclinux-7.0

Comments (0)

Files changed (2)

File var/vabs/libmusicbrainz/src/libmusicbrainz.SlackBuild

 # from all over the internet. 
 #
 # Generated by sbbuilder-0.4.12.3, written by Rodrigo Bistolfi 
-# (rbistolfi) and Raimon Grau Cuscó (Kidd) for VectorLinux.
+# (rbistolfi) and Raimon Grau Cuscó (Kidd) for VectorLinux.
 #
 # Please put your name below if you add some original scripting lines.
 # AUTHORS = 
 
-NAME="libmusicbrainz"            #Enter package Name!
-VERSION=${VERSION:-"5.0.1"}      #Enter package Version!
+NAME="libmusicbrainz2"            #Enter package Name!
+VERSION=${VERSION:-"2.1.5"}      #Enter package Version!
 VER=$(echo $VERSION|sed 's/-/_/') #this fixes - in version
 VL_PACKAGER=${VL_PACKAGER:-"hata_ph"}   #Enter your Name!
-LINK=${LINK:-"https://github.com/downloads/metabrainz/$NAME/$NAME-$VERSION.tar.gz"}  #Enter URL for package here!
+LINK=${LINK:-"http://ftp.musicbrainz.org/pub/musicbrainz/historical/libmusicbrainz-$VERSION.tar.gz"}  #Enter URL for package here!
 
 
 #SYSTEM VARIABLES
 rm -rf $PKG
 mkdir -p $PKG
 cd $TMP
-rm -rf $NAME-$VERSION
+rm -rf libmusicbrainz-$VERSION
 
 
 #EXTRACT SOURCES
 #-----------------------------------------------------
 echo "Extracting source..."
-tar xvf $CWD/$NAME-$VERSION.tar.* || exit 1
+tar xvf $CWD/libmusicbrainz-$VERSION.tar.* || exit 1
 #-----------------------------------------------------
 
 
-cd $TMP/$NAME-$VERSION
+cd $TMP/libmusicbrainz-$VERSION
 
-# Put any Patches into a patches folder in the src dir
+#PATCHES
 #-----------------------------------------------------
-#for i in $CWD/patches/*;do
-#	patch -p1 <$i
-#done
+# Put any Patches here *NOTE this only works if all 
+# your patches use the -p1 strip option!
+#-----------------------------------------------------
+for i in $CWD/patches/*;do
+#  patch -p1 <$i
+  mkdir -p $PKG/usr/doc/$NAME-$VERSION/patches/
+  cp $i $PKG/usr/doc/$NAME-$VERSION/patches/
+done
 #-----------------------------------------------------
 
+patch -p1 <$CWD/patches/musicbrainz-2.1.4-gcc43-includes.patch
 
 #SET PERMISSIONS
 #-----------------------------------------
 #-----------------------------------------------------------------------
 
 echo "Configuring source..."
-cmake \
-    -DCMAKE_BUILD_TYPE=Release \
-    -DCMAKE_INSTALL_PREFIX=/usr \
-    -DBUILD_SHARED_LIBS:BOOL=ON \
-    -DBUILD_STATIC_LIBS:BOOL=OFF \
-    -DMAN_INSTALL_DIR=/usr/man \
-    -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+./configure --prefix=/usr \
+  --libdir=/usr/lib${LIBDIRSUFFIX} \
+  --infodir=/usr/info \
+  --sysconfdir=/etc \
+  --localstatedir=/var \
+  --mandir=/usr/man \
+  --disable-debug \
+  --program-prefix="" \
+  --program-suffix="" \
+  --build=$CONFIGURE_TRIPLET \
+  $CONFIG_OPTIONS || exit 1
 
 make || exit 1
 
 
 
 mkdir -p $PKG/usr/doc/$NAME-$VERSION
-cp -a AUTHORS* COPYING* INSTALL* NEWS* README* \
+cp -a AUTHORS* COPYING* ChangeLog INSTALL* TODO README* \
 $PKG/usr/doc/$NAME-$VERSION
 cat $CWD/$NAME.SlackBuild > $PKG/usr/doc/$NAME-$VERSION/$NAME.SlackBuild
 

File var/vabs/libmusicbrainz/src/patches/musicbrainz-2.1.4-gcc43-includes.patch

+diff -Naur libmusicbrainz-2.1.4-orig/lib/c_wrapper.cpp libmusicbrainz-2.1.4/lib/c_wrapper.cpp
+--- libmusicbrainz-2.1.4-orig/lib/c_wrapper.cpp	2003-10-16 16:21:10.000000000 -0600
++++ libmusicbrainz-2.1.4/lib/c_wrapper.cpp	2007-12-16 09:45:21.000000000 -0600
+@@ -24,6 +24,7 @@
+ #include "musicbrainz.h"
+ #include "trm.h"
+ #include "mb_c.h"
++#include <cstring>
+ 
+ extern "C"
+ {
+diff -Naur libmusicbrainz-2.1.4-orig/lib/comhttpsocket.cpp libmusicbrainz-2.1.4/lib/comhttpsocket.cpp
+--- libmusicbrainz-2.1.4-orig/lib/comhttpsocket.cpp	2006-05-11 12:46:54.000000000 -0600
++++ libmusicbrainz-2.1.4/lib/comhttpsocket.cpp	2007-12-16 09:46:28.000000000 -0600
+@@ -20,6 +20,7 @@
+ #endif
+ #include <stdlib.h>
+ #include <assert.h>
++#include <cstring>
+ 
+ const char* g_strCOMVer = "libmusicbrainz/"VERSION;
+ 
+diff -Naur libmusicbrainz-2.1.4-orig/lib/comsocket.cpp libmusicbrainz-2.1.4/lib/comsocket.cpp
+--- libmusicbrainz-2.1.4-orig/lib/comsocket.cpp	2006-05-11 12:46:54.000000000 -0600
++++ libmusicbrainz-2.1.4/lib/comsocket.cpp	2007-12-16 09:46:08.000000000 -0600
+@@ -37,6 +37,7 @@
+ #include <netinet/tcp.h>
+ #include <errno.h>
+ #include <stdio.h>
++#include <cstring>
+ #include <sys/time.h>
+ #include <sys/types.h>
+ #include <unistd.h>
+diff -Naur libmusicbrainz-2.1.4-orig/lib/http.cpp libmusicbrainz-2.1.4/lib/http.cpp
+--- libmusicbrainz-2.1.4-orig/lib/http.cpp	2007-12-16 09:52:48.000000000 -0600
++++ libmusicbrainz-2.1.4/lib/http.cpp	2007-12-16 09:52:36.000000000 -0600
+@@ -31,6 +31,8 @@
+ #endif
+ #include <fcntl.h>    
+ #include <errno.h>    
++#include <cstring>
++#include <cstdlib>
+ 
+ #ifdef WIN32
+ #include <winsock.h>
+diff -Naur libmusicbrainz-2.1.4-orig/lib/sigclient.cpp libmusicbrainz-2.1.4/lib/sigclient.cpp
+--- libmusicbrainz-2.1.4-orig/lib/sigclient.cpp	2006-05-11 12:46:54.000000000 -0600
++++ libmusicbrainz-2.1.4/lib/sigclient.cpp	2007-12-16 09:54:48.000000000 -0600
+@@ -33,6 +33,8 @@
+ #pragma warning(disable:4786)
+ #endif
+ 
++#include <cstring>
++
+ #include "sigclient.h"
+ #include "comhttpsocket.h"
+