[shotwell] Use more complete multilib fix from upstream

Michel Alexandre Salim salimma at fedoraproject.org
Fri Apr 1 09:05:56 UTC 2011


commit 044730f2783723a6c297c6335e147f2ed174decc
Author: Michel Alexandre Salim <michel at sylvestre.me>
Date:   Fri Apr 1 11:05:39 2011 +0200

    Use more complete multilib fix from upstream

 shotwell-0.9.0-multilib.patch |  134 ++++++++++++++++++++++++++++++++++------
 shotwell.spec                 |   10 ++--
 2 files changed, 119 insertions(+), 25 deletions(-)
---
diff --git a/shotwell-0.9.0-multilib.patch b/shotwell-0.9.0-multilib.patch
index 3023822..ff6873d 100644
--- a/shotwell-0.9.0-multilib.patch
+++ b/shotwell-0.9.0-multilib.patch
@@ -1,37 +1,131 @@
---- shotwell-0.9.0/shotwell-plugin-dev-1.0.m4.multilib	2011-03-22 21:46:17.000000000 +0100
-+++ shotwell-0.9.0/shotwell-plugin-dev-1.0.m4	2011-03-28 23:51:23.566516796 +0200
-@@ -1,6 +1,6 @@
- prefix=_PREFIX_
- exec_prefix=${prefix}
--libdir=${exec_prefix}/lib
-+libdir=${exec_prefix}/_LIB_
- includedir=${prefix}/include
- 
- Name: Shotwell Plugin Development
---- shotwell-0.9.0/Makefile.multilib	2011-03-22 21:46:17.000000000 +0100
-+++ shotwell-0.9.0/Makefile	2011-03-28 23:59:24.713516781 +0200
-@@ -12,6 +12,7 @@
- 
- # defaults that may be overridden by configure.mk
+From bec8dcaa01f71a44320c7437493e281d8d47bd2a Mon Sep 17 00:00:00 2001
+From: lucas <lucas at 3d32681d-0f36-45c0-afa7-64c43348dfec>
+Date: Thu, 31 Mar 2011 21:17:50 +0000
+Subject: [PATCH] Allows configuring the name of the system library directory at build time. Closes #3421.
+
+git-svn-id: svn://svn.yorba.org/shotwell/trunk@2823 3d32681d-0f36-45c0-afa7-64c43348dfec
+---
+ Makefile                   |    7 ++++---
+ configure                  |   12 +++++++++++-
+ shotwell-plugin-dev-1.0.m4 |    2 +-
+ src/AppDirs.vala           |    2 +-
+ src/Resources.vala         |    5 ++++-
+ 5 files changed, 21 insertions(+), 7 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 9cab74f..c900420 100644
+--- a/Makefile
++++ b/Makefile
+@@ -14,19 +14,19 @@ INSTALL_DATA := install -m 644
  PREFIX=/usr/local
-+LIB=lib
  SCHEMA_FILE_DIR=/etc/gconf/schemas
  BUILD_RELEASE=1
++LIB=lib
+ 
+ -include configure.mk
  
-@@ -26,7 +27,6 @@
- SUPPORTED_LANGUAGES=fr de it es pl et sv sk lv pt bg bn nl da zh_CN el ru pa hu en_GB uk ja fi zh_TW cs nb id th sl hr ar ast ro sr lt gl tr ca ko kk pt_BR eu he mk te_IN
+ VALAFLAGS := -g --enable-checking --thread --fatal-warnings $(USER_VALAFLAGS)
+ DEFINES := _PREFIX='"$(PREFIX)"' _VERSION='"$(VERSION)"' GETTEXT_PACKAGE='"$(GETTEXT_PACKAGE)"' \
+-	_LANG_SUPPORT_DIR='"$(SYSTEM_LANG_DIR)"'
++	_LANG_SUPPORT_DIR='"$(SYSTEM_LANG_DIR)"' _LIBDIR='"${LIB}"'
+ 
+ EXPORT_FLAGS = -export-dynamic
+ 
+ SUPPORTED_LANGUAGES=fr de it es pl et sv sk lv pt bg bn nl da zh_CN el ru pa hu en_GB uk ja fi zh_TW cs nb id th sl hr ar ast ro sr lt gl tr ca ko kk pt_BR eu he mk te ta
  LOCAL_LANG_DIR=locale-langpack
  SYSTEM_LANG_DIR=$(DESTDIR)$(PREFIX)/share/locale
 -LIB=lib
  
  include units.mk
  include plugins/plugins.mk
-@@ -557,7 +557,7 @@
+@@ -556,7 +556,8 @@ ifdef INSTALL_HEADERS
  endif
  
  $(PC_FILE): $(PC_INPUT) $(MAKE_FILES)
 -	m4 '--define=_VERSION_=$(VERSION)' '--define=_PREFIX_=$(PREFIX)' '--define=_REQUIREMENTS_=$(PLUGIN_PKG_REQS)' $< > $@
-+	m4 '--define=_VERSION_=$(VERSION)' '--define=_PREFIX_=$(PREFIX)' '--define=_LIB_=$(LIB)' '--define=_REQUIREMENTS_=$(PLUGIN_PKG_REQS)' $< > $@
++	m4 '--define=_VERSION_=$(VERSION)' '--define=_PREFIX_=$(PREFIX)' '--define=_REQUIREMENTS_=$(PLUGIN_PKG_REQS)' \
++		'--define=_LIB_=$(LIB)' $< > $@
  
  $(UNITIZE_STAMP): $(MAKE_FILES) src/unit/rc/UnitInternals.m4 src/unit/rc/unitize_entry.m4
  	@mkdir -p $(UNITIZE_DIR)
+diff --git a/configure b/configure
+index 815cfad..a63259f 100755
+--- a/configure
++++ b/configure
+@@ -19,6 +19,8 @@ configure_help() {
+     printf "\t\t\t\t[--release]\n"
+     printf "\t--prefix=PREFIX\t\tPrepend PREFIX to program installation paths.\n"
+     printf "\t\t\t\t[/usr/local]\n"
++    printf "\t--libdir=LIBDIR\t\tSet system library directory name to LIBDIR\n\t\t\t\t(usually 'lib' or 'lib64').\n"
++    printf "\t\t\t\t[lib]\n"
+     printf "\t--define=SYMBOL\t\tDefine a symbol for the Vala compiler.\n"
+     printf "\t--with-gconf-schema-file-dir=DIR\n"
+     printf "\t\t\t\tDirectory for installing schema files.\n"
+@@ -65,7 +67,15 @@ do
+                             
+                             variables="${variables}PREFIX=$value\n"
+                             ;;
+-        
++
++        --libdir)           if [ ! $value ]
++                            then
++                                abort $1
++                            fi
++                            
++                            variables="${variables}LIB=$value\n"
++                            ;;
++
+         --assume-pkgs)      variables="${variables}ASSUME_PKGS=1\n"
+                             ;;
+         
+diff --git a/shotwell-plugin-dev-1.0.m4 b/shotwell-plugin-dev-1.0.m4
+index 3a2fc94..1cbf175 100644
+--- a/shotwell-plugin-dev-1.0.m4
++++ b/shotwell-plugin-dev-1.0.m4
+@@ -1,6 +1,6 @@
+ prefix=_PREFIX_
+ exec_prefix=${prefix}
+-libdir=${exec_prefix}/lib
++libdir=${exec_prefix}/_LIB_
+ includedir=${prefix}/include
+ 
+ Name: Shotwell Plugin Development
+diff --git a/src/AppDirs.vala b/src/AppDirs.vala
+index e69238b..72f7a0e 100644
+--- a/src/AppDirs.vala
++++ b/src/AppDirs.vala
+@@ -153,7 +153,7 @@ class AppDirs {
+     public static File get_lib_dir() {
+         File? install_dir = get_install_dir();
+         
+-        return (install_dir != null) ? install_dir.get_child("lib").get_child("shotwell")
++        return (install_dir != null) ? install_dir.get_child(Resources.LIBDIR).get_child("shotwell")
+             : get_exec_dir();
+     }
+     
+diff --git a/src/Resources.vala b/src/Resources.vala
+index 9123d8c..a5f8e47 100644
+--- a/src/Resources.vala
++++ b/src/Resources.vala
+@@ -8,6 +8,7 @@
+ extern const string _PREFIX;
+ extern const string _VERSION;
+ extern const string GETTEXT_PACKAGE;
++extern const string _LIBDIR;
+ 
+ namespace Resources {
+     public const string APP_TITLE = "Shotwell";
+@@ -21,7 +22,9 @@ namespace Resources {
+     public const string WIKI_URL = "http://trac.yorba.org/wiki/Shotwell";
+     public const string FAQ_URL = "http://trac.yorba.org/wiki/Shotwell/FAQ";
+     public const string DIR_PATTERN_URI_SYSWIDE = "ghelp:shotwell?other-files";
+-    
++
++    private const string LIBDIR = _LIBDIR;
++
+     public const string PREFIX = _PREFIX;
+ 
+     public const double TRANSIENT_WINDOW_OPACITY = 0.90;
+-- 
+1.7.4.2
+
diff --git a/shotwell.spec b/shotwell.spec
index a01625f..a2113e2 100644
--- a/shotwell.spec
+++ b/shotwell.spec
@@ -1,6 +1,6 @@
 Name:           shotwell
 Version:        0.9.0
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        A photo organizer for the GNOME desktop
 
 Group:          Applications/Multimedia
@@ -49,13 +49,10 @@ them, and share them with others.
 %prep
 %setup -q
 %patch0 -p1 -b .multilib
-# AppDirs.vala still needs manual patching
-sed -i 's|"lib"|"%{_lib}"|' src/AppDirs.vala
 
 %build
-./configure --prefix=%{_prefix} --disable-schemas-install --assume-pkgs
+./configure --prefix=%{_prefix} --libdir=%{_lib} --disable-schemas-install --assume-pkgs
 echo CFLAGS=%{optflags} >> configure.mk
-echo LIB=%{_lib} >> configure.mk
 make %{?_smp_mflags}
 
 
@@ -115,6 +112,9 @@ gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor &>/dev/null || :
 
 
 %changelog
+* Fri Apr  1 2011 Michel Salim <salimma at fedoraproject.org> - 0.9.0-3
+- Use more complete multilib fix from upstream
+
 * Mon Mar 28 2011 Michel Salim <salimma at fedoraproject.org> - 0.9.0-2
 - Look for plugins in correct directory on 64-bit systems (# 690927)
 


More information about the scm-commits mailing list