]> git.pld-linux.org Git - packages/vice.git/commitdiff
- added fonts patch to avoid installing fonts in builder's home
authorJakub Bogusz <qboosh@pld-linux.org>
Mon, 21 Feb 2011 18:12:41 +0000 (18:12 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- added link patch to avoid -lnsl -lbsd and other junk
- install bdf and ttf fonts in proper dirs
- handle esd and pulse options/bconds with up to date defaults (esd off, pulse on)

Changed files:
    vice-fonts.patch -> 1.1
    vice-link.patch -> 1.1
    vice.spec -> 1.60

vice-fonts.patch [new file with mode: 0644]
vice-link.patch [new file with mode: 0644]
vice.spec

diff --git a/vice-fonts.patch b/vice-fonts.patch
new file mode 100644 (file)
index 0000000..cb39c8a
--- /dev/null
@@ -0,0 +1,24 @@
+--- vice-2.2/data/fonts/Makefile.am.orig       2011-02-20 15:01:38.490973392 +0100
++++ vice-2.2/data/fonts/Makefile.am    2011-02-20 21:21:36.078979259 +0100
+@@ -6,21 +6,3 @@
+ EXTRA_DIST = $(fonts_DATA) cbm-directory-charset.fon 
+-install: install-data-am
+-@HAVE_FC_CACHE_TRUE@@SDL_COMPILE_FALSE@       @echo "Preparing fontdir, please wait..." ; \
+-@HAVE_FC_CACHE_TRUE@@SDL_COMPILE_FALSE@       if [ ! `fc-cache --list > /dev/null 2>&1` ] ; then \
+-@HAVE_FC_CACHE_TRUE@@SDL_COMPILE_FALSE@         if test "x${HOME}" != "x" ; then \
+-@HAVE_FC_CACHE_TRUE@@SDL_COMPILE_FALSE@           mkdir ${HOME}/.fonts > /dev/null 2>&1 ; \
+-@HAVE_FC_CACHE_TRUE@@SDL_COMPILE_FALSE@           cp $(fontsdir)/CBM.ttf ${HOME}/.fonts ; \
+-@HAVE_FC_CACHE_TRUE@@SDL_COMPILE_FALSE@           fc-cache ; \
+-@HAVE_FC_CACHE_TRUE@@SDL_COMPILE_FALSE@         else \
+-@HAVE_FC_CACHE_TRUE@@SDL_COMPILE_FALSE@           echo '$$HOME not set... giving up.' ; \
+-@HAVE_FC_CACHE_TRUE@@SDL_COMPILE_FALSE@         fi \
+-@HAVE_FC_CACHE_TRUE@@SDL_COMPILE_FALSE@       else \
+-@HAVE_FC_CACHE_TRUE@@SDL_COMPILE_FALSE@         echo 'fc-cache not available... giving up.' ; \
+-@HAVE_FC_CACHE_TRUE@@SDL_COMPILE_FALSE@       fi
+-@HAVE_FC_CACHE_FALSE@@SDL_COMPILE_FALSE@      @echo "Preparing fontdir..." ; \
+-@HAVE_FC_CACHE_FALSE@@SDL_COMPILE_FALSE@      cd $(DESTDIR)$(fontsdir) ; \
+-@HAVE_FC_CACHE_FALSE@@SDL_COMPILE_FALSE@      bdftopcf -o vice-cbm.pcf vice-cbm.bdf ; \
+-@HAVE_FC_CACHE_FALSE@@SDL_COMPILE_FALSE@      rm vice-cbm.bdf ; \
+-@HAVE_FC_CACHE_FALSE@@SDL_COMPILE_FALSE@      mkfontdir .
diff --git a/vice-link.patch b/vice-link.patch
new file mode 100644 (file)
index 0000000..f2d9c05
--- /dev/null
@@ -0,0 +1,38 @@
+--- vice-2.2/configure.in.orig 2011-02-21 16:41:42.186971716 +0100
++++ vice-2.2/configure.in      2011-02-21 18:43:03.414973392 +0100
+@@ -1106,19 +1106,6 @@
+   if test x"$UNIX_NETWORK_HEADERS_PRESENT" = "xyes"; then
+-    dnl Check for possible extra needed network libraries
+-    AC_CHECK_LIB(nsl, gethostbyname,[ NETPLAY_LIBS="-lnsl $NETPLAY_LIBS";
+-                                      LIBS="-lnsl $LIBS"],,)
+-    AC_CHECK_LIB(socket, gethostbyname,[ NETPLAY_LIBS="-lsocket $NETPLAY_LIBS";
+-                                         LIBS="-lsocket $LIBS"],,)
+-    AC_CHECK_LIB(bsd, gethostbyname,[ NETPLAY_LIBS="-lbsd $NETPLAY_LIBS";
+-                                      LIBS="-lbsd $LIBS"],,)
+-    AC_CHECK_LIB(net, gethostbyname,[ NETPLAY_LIBS="-lnet $NETPLAY_LIBS";
+-                                      LIBS="-lnet $LIBS"],,)
+-    AC_CHECK_LIB(inet, gethostbyname,[ NETPLAY_LIBS="-linet $NETPLAY_LIBS";
+-                                       LIBS="-linet $LIBS"],,)
+-    AC_CHECK_LIB(watt, gethostbyname,[ NETPLAY_LIBS="-lwatt $NETPLAY_LIBS";
+-                                       LIBS="-lwatt $LIBS"],,)
+     dnl Check for needed functions
+     UNIX_NETWORK_FUNCS_PRESENT=yes
+@@ -2040,15 +2027,6 @@
+     LINK_X_LIBS="$GTK_LIBS $GTKGL_LIBS $LINK_X_LIBS"
+   else
+     AC_DEFINE(USE_COLOR_MANAGEMENT,,[Enable new color management code.])
+-    dnl instead of assuming that libsocket needs libnsl, we
+-    dnl will check the existance of libnsl first.
+-
+-    AC_CHECK_LIB(nsl, gethostbyname,[ X_LIBS="-lnsl $X_LIBS";
+-                 LINK_X_LIBS="-lnsl $LINK_X_LIBS"],,$X_LIBS)
+-    AC_CHECK_LIB(socket, gethostbyname,[ X_LIBS="-lsocket $X_LIBS";
+-                 LINK_X_LIBS="-lsocket $LINK_X_LIBS"],,$X_LIBS)
+-    AC_CHECK_LIB(bsd, gethostbyname,[ X_LIBS="-lbsd $X_LIBS";
+-                 LINK_X_LIBS="-lbsd $LINK_X_LIBS"],,$X_LIBS)
+     if test x"$ac_cv_lib_ICE_IceConnectionNumber" != "xyes"; then
+       unset ac_cv_lib_ICE_IceConnectionNumber
+     fi
index 28a12ac22b5aa635a71976e315cd5e9ab939890d..fd790e41f25068c7c92cae8b7bc1f48393b7dedf 100644 (file)
--- a/vice.spec
+++ b/vice.spec
@@ -1,7 +1,8 @@
-# TODO:
-# - on installation in tries to copy /usr/share/fonts/misc/CBM.ttf to
-#   $HOME/.fonts, which is obviously wrong and requires preinstalled vice;
-#   FIX data/fonts/Makefile.am
+#
+# Conditional build:
+%bcond_with    esd             # EsounD support
+%bcond_without pulseaudio      # pulseaudio support
+#
 Summary:       Versatile Commodore Emulator
 Summary(pl.UTF-8):     Uniwersalny emulator Commodore
 Name:          vice
@@ -20,6 +21,8 @@ Source6:      %{name}-vic20.desktop
 Patch0:                %{name}-info.patch
 Patch1:                %{name}-gettext.patch
 Patch2:                %{name}-home_etc.patch
+Patch3:                %{name}-fonts.patch
+Patch4:                %{name}-link.patch
 URL:           http://www.viceteam.org/
 BuildRequires: OpenGL-GLX-devel
 BuildRequires: SDL-devel >= 1.2.0
@@ -27,16 +30,20 @@ BuildRequires:      alsa-lib-devel
 BuildRequires: autoconf
 BuildRequires: automake
 BuildRequires: bison
+%{?with_esd:BuildRequires:     esound-devel}
 BuildRequires: flex
+BuildRequires: ffmpeg-devel
 BuildRequires: gettext-devel
 BuildRequires: giflib-devel
 BuildRequires: gtk+2-devel >= 1:2.0
+BuildRequires: gtkglext-devel
 BuildRequires: lame-libs-devel
 BuildRequires: libjpeg-devel
 BuildRequires: libpng-devel
 BuildRequires: libstdc++-devel
 BuildRequires: perl-base
 BuildRequires: pkgconfig
+%{?with_pulseaudio:BuildRequires:      pulseaudio-devel}
 BuildRequires: readline-devel
 BuildRequires: texinfo
 BuildRequires: xorg-app-bdftopcf
@@ -69,6 +76,8 @@ pasowaƂ do tej linii), CBM-II (C610) oraz Plus4.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
+%patch4 -p1
 %{__perl} -i -pe 's@\$\(VICEDIR\)/fonts@%{_fontsdir}/misc@' data/fonts/Makefile.am
 
 %build
@@ -83,13 +92,16 @@ cd ../..
 %configure \
        --libdir=%{_datadir} \
        --enable-autobpp \
-       --with-sdl \
        --enable-fullscreen \
        --enable-gnomeui \
        --enable-nls \
-       --without-xaw3d \
+       %{?with_pulseaudio:--with-pulse} \
+       --with-sdl \
+       --with-x \
+       %{!?with_esd:--without-esd} \
        --without-included-gettext \
-       --with-x
+       --without-xaw3d
+
 # contains some C++ code included as "old" library (.a), so libtool can't detect it
 %{__make} \
        CCLD="%{__cxx}"
@@ -103,8 +115,8 @@ install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}}
        DESTDIR=$RPM_BUILD_ROOT \
        VICEDIR="%{_datadir}/%{name}"
 
-rm -f doc/html/{Makefile*,texi2html}
-rm -rf $RPM_BUILD_ROOT%{_datadir}/vice/doc
+%{__rm} doc/html/{Makefile*,texi2html}
+%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/vice/doc
 # ?
 #ln -sf %{_docdir}/%{name}-%{version}/html $RPM_BUILD_ROOT%{_datadir}/vice/doc
 
@@ -121,26 +133,50 @@ for i in *icon.c; do
 done
 cd ../../../..
 
+install -d $RPM_BUILD_ROOT%{_fontsdir}/TTF
+mv $RPM_BUILD_ROOT%{_fontsdir}/{misc,TTF}/CBM.ttf
+
 %find_lang %{name}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %post
+fontpostinst TTF
 fontpostinst misc
 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
 
 %postun
+fontpostinst TTF
 fontpostinst misc
 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
 
 %files -f %{name}.lang
 %defattr(644,root,root,755)
 %doc AUTHORS ChangeLog FEEDBACK NEWS README doc/iec-bus.txt doc/mon.txt doc/html
-%attr(755,root,root) %{_bindir}/*
+%attr(755,root,root) %{_bindir}/c1541
+%attr(755,root,root) %{_bindir}/cartconv
+%attr(755,root,root) %{_bindir}/petcat
+%attr(755,root,root) %{_bindir}/vsid
+%attr(755,root,root) %{_bindir}/x128
+%attr(755,root,root) %{_bindir}/x64
+%attr(755,root,root) %{_bindir}/x64dtv
+%attr(755,root,root) %{_bindir}/xcbm2
+%attr(755,root,root) %{_bindir}/xpet
+%attr(755,root,root) %{_bindir}/xplus4
+%attr(755,root,root) %{_bindir}/xvic
 %{_datadir}/vice
-%{_fontsdir}/misc/*
-%{_mandir}/man?/*
-%{_infodir}/*.info*
-%{_desktopdir}/*.desktop
-%{_pixmapsdir}/*
+%{_fontsdir}/misc/vice-cbm.bdf
+%{_fontsdir}/TTF/CBM.ttf
+%{_mandir}/man1/c1541.1*
+%{_mandir}/man1/petcat.1*
+%{_mandir}/man1/vice.1*
+%{_infodir}/vice.info*
+%{_desktopdir}/vice-*.desktop
+%{_pixmapsdir}/c128icon.xpm
+%{_pixmapsdir}/c64dtvicon.xpm
+%{_pixmapsdir}/c64icon.xpm
+%{_pixmapsdir}/cbm2icon.xpm
+%{_pixmapsdir}/peticon.xpm
+%{_pixmapsdir}/plus4icon.xpm
+%{_pixmapsdir}/vic20icon.xpm
This page took 0.124451 seconds and 4 git commands to generate.