[packages/icc_examin] - new - configure patch fixes detection with pkg-config when --cflags are empty - paths patch fixes
qboosh
qboosh at pld-linux.org
Sun Mar 31 19:07:56 CEST 2013
commit ddfd3fcaed158779e25f991779ec4fb08db38ada
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Mar 31 19:07:39 2013 +0200
- new
- configure patch fixes detection with pkg-config when --cflags are empty
- paths patch fixes path to system DejaVuSans font
icc_examin-configure.patch | 210 +++++++++++++++++++++++++++++++++++++++++++++
icc_examin-paths.patch | 20 +++++
icc_examin.spec | 85 ++++++++++++++++++
3 files changed, 315 insertions(+)
---
diff --git a/icc_examin.spec b/icc_examin.spec
new file mode 100644
index 0000000..36d98fd
--- /dev/null
+++ b/icc_examin.spec
@@ -0,0 +1,85 @@
+Summary: X Color Management tools
+Summary(pl.UTF-8): Narzędzia X Color Management (do zarządzania kolorami w X)
+Name: icc_examin
+Version: 0.54
+Release: 1
+License: MIT
+Group: X11/Applications/Graphics
+Source0: http://downloads.sourceforge.net/oyranos/%{name}-%{version}.tar.bz2
+# Source0-md5: 4add0302cc7978549335f507d711605c
+Patch0: %{name}-configure.patch
+Patch1: %{name}-paths.patch
+URL: http://www.oyranos.org/icc-examin
+BuildRequires: OpenGL-GLU-devel
+BuildRequires: fltk-devel >= 1.1.4
+BuildRequires: fltk-gl-devel >= 1.1.4
+BuildRequires: fontconfig-devel
+BuildRequires: ftgl-devel >= 2.1.2
+BuildRequires: gettext-devel
+BuildRequires: lcms-devel >= 1.14
+BuildRequires: libpng-devel
+BuildRequires: libtiff-devel
+BuildRequires: oyranos-devel
+BuildRequires: xorg-lib-libX11-devel
+BuildRequires: xorg-lib-libXinerama-devel
+BuildRequires: xorg-lib-libXxf86vm-devel
+Requires: fltk >= 1.1.4
+# DejaVuSans.ttf
+Requires: fonts-TTF-dejavu
+Requires: ftgl >= 2.1.2
+Requires: ftgl-gl >= 2.1.2
+Requires: lcms >= 1.14
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+ICC Examin (unix name: iccexamin) is a viewer for the internals of a
+ICC profile, measurement data (CGATS), argylls gamut VRML
+visualisations and video card gamma tables.
+
+%description -l pl.UTF-8
+ICC Examin (polecenie iccexamin) to przeglądarka wnętrzności profili
+ICC, danych pomiarowych (CGATS), wizualizacji VRML gam argylla oraz
+tablic gamma kart graficznych.
+
+%prep
+%setup -q
+%patch0 -p1
+%patch1 -p1
+
+%build
+export CC="%{__cc}"
+export CXX="%{__cxx}"
+export CFLAGS="%{rpmcflags}"
+export CXXFLAGS="%{rpmcxxflags}"
+export LDFLAGS="%{rpmldflags}"
+# NOTE: not autoconf configure, but mostly compatible
+%configure
+
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
+
+# system DejaVuSans.ttf is used instead
+%{__rm} $RPM_BUILD_ROOT%{_fontsdir}/FreeSans.ttf
+
+# fix location of themable icon
+install -d $RPM_BUILD_ROOT%{_iconsdir}
+mv $RPM_BUILD_ROOT%{_pixmapsdir}/hicolor $RPM_BUILD_ROOT%{_iconsdir}
+
+%find_lang icc_examin
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files -f icc_examin.lang
+%defattr(644,root,root,755)
+%doc AUTHORS BUGS ChangeLog README TODO
+%attr(755,root,root) %{_bindir}/iccexamin
+%{_desktopdir}/iccexamin.desktop
+%{_pixmapsdir}/iccexamin.png
+%{_iconsdir}/hicolor/scalable/iccexamin.svg
+%{_mandir}/man1/iccexamin.1*
diff --git a/icc_examin-configure.patch b/icc_examin-configure.patch
new file mode 100644
index 0000000..71e4995
--- /dev/null
+++ b/icc_examin-configure.patch
@@ -0,0 +1,210 @@
+--- icc_examin-0.54/configure_tests.sh.orig 2012-12-20 18:38:30.459364279 +0100
++++ icc_examin-0.54/configure_tests.sh 2013-03-31 14:50:55.109904248 +0200
+@@ -529,6 +529,7 @@
+
+ if [ -n "$XCM" ] && [ $XCM -gt 0 ]; then
+ found=""
++ cflags=""
+ version=""
+ pc_package=xcm
+ name="xcm"
+@@ -543,7 +544,8 @@
+ if [ -z "$found" ]; then
+ pkg-config --atleast-version=0.2 $pc_package
+ if [ $? = 0 ]; then
+- found=`pkg-config --cflags $pc_package`
++ found=yes
++ cflags=`pkg-config --cflags $pc_package`
+ version=`pkg-config --modversion $pc_package`
+ fi
+ fi
+@@ -557,7 +559,7 @@
+ if [ -n "$MAKEFILE_DIR" ]; then
+ for i in $MAKEFILE_DIR; do
+ test -f "$ROOT_DIR/$i/makefile".in && echo "XCM = 1" >> "$i/makefile"
+- test -f "$ROOT_DIR/$i/makefile".in && echo "XCM_H = $found" >> "$i/makefile"
++ test -f "$ROOT_DIR/$i/makefile".in && echo "XCM_H = $cflags" >> "$i/makefile"
+ test -f "$ROOT_DIR/$i/makefile".in && echo "$ID_LIBS = `pkg-config --libs $name | sed \"$STRIPOPT\"`" >> "$i/makefile"
+ done
+ fi
+@@ -575,22 +577,27 @@
+
+ if [ -n "$X11" ] && [ $X11 -gt 0 ]; then
+ found=""
++ cflags=""
+ version=""
+ pc_package=x11
+ if [ -z "$found" ]; then
+ pkg-config --atleast-version=1.0 $pc_package
+ if [ $? = 0 ]; then
+- found=`pkg-config --cflags $pc_package`
++ found=yes
++ cflags=`pkg-config --cflags $pc_package`
+ version=`pkg-config --modversion $pc_package`
+ fi
+ fi
+ if [ -z "$found" ]; then
+ if [ -f /usr/X11R6/include/X11/Xlib.h ]; then
+- found="-I/usr/X11R6/include"
++ cflags="-I/usr/X11R6/include"
++ found=yes
+ elif [ -f /usr/include/X11/Xlib.h ]; then
+- found="-I/usr/include"
++ cflags="-I/usr/include"
++ found=yes
+ elif [ -f $includedir/X11/Xlib.h ]; then
+- found="-I$includedir"
++ cflags="-I$includedir"
++ found=yes
+ fi
+ fi
+ if [ -z "$found" ] && [ $OSUNAME = "Linux" ]; then
+@@ -603,22 +610,27 @@
+ if [ -n "$X11" ] && [ $X11 -gt 0 ]; then
+ if [ -n "$XF86VMODE" ] && [ $XF86VMODE -gt 0 ]; then
+ found=""
++ cflags=""
+ version=""
+ pc_package=xf86vidmodeproto
+ if [ -z "$found" ]; then
+ pkg-config --atleast-version=1.0 $pc_package
+ if [ $? = 0 ]; then
+- found=`pkg-config --cflags $pc_package`
++ found=yes
++ cflags=`pkg-config --cflags $pc_package`
+ version=`pkg-config --modversion $pc_package`
+ fi
+ fi
+ if [ -z "$found" ]; then
+ if [ -f /usr/X11R6/include/X11/extensions/xf86vmode.h ]; then
+- found="-I/usr/X11R6/include"
++ cflags="-I/usr/X11R6/include"
++ found=yes
+ elif [ -f /usr/include/X11/extensions/xf86vmode.h ]; then
+- found="-I/usr/include"
++ cflags="-I/usr/include"
++ found=yes
+ elif [ -f $includedir/X11/extensions/xf86vmode.h ]; then
+- found="-I$includedir"
++ cflags="-I$includedir"
++ found=yes
+ fi
+ fi
+ if [ -n "$found" ]; then
+@@ -631,7 +643,7 @@
+ if [ -n "$MAKEFILE_DIR" ]; then
+ for i in $MAKEFILE_DIR; do
+ test -f "$ROOT_DIR/$i/makefile".in && echo "XF86VMODE = 1" >> "$i/makefile"
+- test -f "$ROOT_DIR/$i/makefile".in && echo "XF86VMODE_INC = $found" >> "$i/makefile"
++ test -f "$ROOT_DIR/$i/makefile".in && echo "XF86VMODE_INC = $cflags" >> "$i/makefile"
+ done
+ fi
+ elif [ $OSUNAME = "Linux" ]; then
+@@ -642,23 +654,28 @@
+ fi
+
+ if [ -n "$XINERAMA" ] && [ $XINERAMA -gt 0 ]; then
++ cflags=""
+ found=""
+ version=""
+ pc_package=xinerama
+ if [ -z "$found" ]; then
+ pkg-config --atleast-version=1.0 $pc_package
+ if [ $? = 0 ]; then
+- found=`pkg-config --cflags $pc_package`
++ found=yes
++ cflags=`pkg-config --cflags $pc_package`
+ version=`pkg-config --modversion $pc_package`
+ fi
+ fi
+ if [ -z "$found" ]; then
+ if [ -f /usr/X11R6/include/X11/extensions/Xinerama.h ]; then
+- found="-I/usr/X11R6/include"
++ cflags="-I/usr/X11R6/include"
++ found=yes
+ elif [ -f /usr/include/X11/extensions/Xinerama.h ]; then
+- found="-I/usr/include"
++ cflags="-I/usr/include"
++ found=yes
+ elif [ -f $includedir/X11/extensions/Xinerama.h ]; then
+- found="-I$includedir"
++ cflags="-I$includedir"
++ found=yes
+ fi
+ fi
+ if [ -n "$found" ]; then
+@@ -671,7 +688,7 @@
+ if [ -n "$MAKEFILE_DIR" ]; then
+ for i in $MAKEFILE_DIR; do
+ test -f "$ROOT_DIR/$i/makefile".in && echo "XIN = 1" >> "$i/makefile"
+- test -f "$ROOT_DIR/$i/makefile".in && echo "XINERAMA_INC = $found" >> "$i/makefile"
++ test -f "$ROOT_DIR/$i/makefile".in && echo "XINERAMA_INC = $cflags" >> "$i/makefile"
+ done
+ fi
+ elif [ $OSUNAME = "Linux" ]; then
+@@ -683,12 +700,14 @@
+
+ if [ -n "$XRANDR" ] && [ $XRANDR -gt 0 ]; then
+ found=""
++ cflags=""
+ version=""
+ pc_package=xrandr
+ if [ -z "$found" ]; then
+ pkg-config --atleast-version=1.2 $pc_package
+ if [ $? = 0 ]; then
+- found=`pkg-config --cflags $pc_package`
++ found=yes
++ cflags=`pkg-config --cflags $pc_package`
+ version=`pkg-config --modversion $pc_package`
+ fi
+ fi
+@@ -702,7 +721,7 @@
+ if [ -n "$MAKEFILE_DIR" ]; then
+ for i in $MAKEFILE_DIR; do
+ test -f "$ROOT_DIR/$i/makefile".in && echo "XRANDR = 1" >> "$i/makefile"
+- test -f "$ROOT_DIR/$i/makefile".in && echo "XRANDR_INC = $found" >> "$i/makefile"
++ test -f "$ROOT_DIR/$i/makefile".in && echo "XRANDR_INC = $cflags" >> "$i/makefile"
+ done
+ fi
+ elif [ $OSUNAME = "Linux" ]; then
+@@ -840,22 +859,27 @@
+ fi
+ if [ -n "$X11" ] && [ $X11 -gt 0 ]; then
+ found=""
++ cflags=""
+ version=""
+ pc_package=x11
+ if [ -z "$found" ]; then
+ pkg-config --atleast-version=1.0 $pc_package
+ if [ $? = 0 ]; then
+- found=`pkg-config --cflags $pc_package`
++ found=yes
++ cflags=`pkg-config --cflags $pc_package`
+ version=`pkg-config --modversion $pc_package`
+ fi
+ fi
+ if [ -z "$found" ]; then
+ if [ -f /usr/X11R6/include/X11/Xlib.h ]; then
+- found="-I/usr/X11R6/include"
++ cflags="-I/usr/X11R6/include"
++ found=yes
+ elif [ -f /usr/include/X11/Xlib.h ]; then
+- found="-I/usr/include"
++ cflags="-I/usr/include"
++ found=yes
+ elif [ -f $includedir/X11/Xlib.h ]; then
+- found="-I$includedir"
++ cflags="-I$includedir"
++ found=yes
+ fi
+ fi
+ if [ -n "$found" ]; then
+@@ -868,7 +892,7 @@
+ if [ -n "$MAKEFILE_DIR" ]; then
+ for i in $MAKEFILE_DIR; do
+ test -f "$ROOT_DIR/$i/makefile".in && echo "X11 = X11" >> "$i/makefile"
+- test -f "$ROOT_DIR/$i/makefile".in && echo "X_H = -I/usr/X11R6/include -I/usr/include $found \$(X11_INCL)" >> "$i/makefile"
++ test -f "$ROOT_DIR/$i/makefile".in && echo "X_H = $cflags \$(X11_INCL)" >> "$i/makefile"
+ done
+ fi
+ elif [ $OSUNAME = "Linux" ]; then
diff --git a/icc_examin-paths.patch b/icc_examin-paths.patch
new file mode 100644
index 0000000..63569d4
--- /dev/null
+++ b/icc_examin-paths.patch
@@ -0,0 +1,20 @@
+--- icc_examin-0.54/icc_gl.cpp.orig 2013-03-31 18:11:39.612986049 +0200
++++ icc_examin-0.54/icc_gl.cpp 2013-03-31 18:16:23.989646789 +0200
+@@ -871,7 +871,7 @@
+ if(font) delete font;
+ if(ortho_font) delete ortho_font;
+
+- const char* font_name = "/usr/share/fonts/dejavu/DejaVuSans.ttf";
++ const char* font_name = "/usr/share/fonts/TTF/DejaVuSans.ttf";
+
+ # ifdef HAVE_FONTCONFIG
+ FcResult r = FcResultMatch;
+@@ -915,7 +915,7 @@
+ # endif
+ if(!holeDateiModifikationsZeit(font_name)) {
+ DBG_PROG_S( _("Could not open font in:") << font_name )
+- font_name = "/usr/share/fonts/truetype/DejaVuSans.ttf";
++ font_name = "/usr/share/fonts/TTF/DejaVuSans.ttf";
+ if(!holeDateiModifikationsZeit(font_name)) {
+ DBG_PROG_S( _("Could not open font in:") << font_name )
+ #ifdef WIN32
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/icc_examin.git/commitdiff/ddfd3fcaed158779e25f991779ec4fb08db38ada
More information about the pld-cvs-commit
mailing list