Author: glen                         Date: Tue May 22 22:21:32 2012 GMT
Module: packages                      Tag: HEAD
---- Log message:
- optflags hacking

---- Files affected:
packages/glyr:
   glyr.spec (1.1 -> 1.2) , optflags.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/glyr/glyr.spec
diff -u packages/glyr/glyr.spec:1.1 packages/glyr/glyr.spec:1.2
--- packages/glyr/glyr.spec:1.1 Wed May 23 00:09:46 2012
+++ packages/glyr/glyr.spec     Wed May 23 00:21:26 2012
@@ -1,6 +1,6 @@
 # $Revision$, $Date$
 # TODO
-# - optflags (-Os -s used upstream)
+# - ldflags not functioning
 Summary:       Searcheninge for Musicrelated Metadata
 Name:          glyr
 Version:       0.9.9
@@ -10,10 +10,12 @@
 URL:           https://github.com/sahib/glyr
 Source0:       
https://github.com/downloads/sahib/glyr/%{name}-%{version}.tar.bz2
 # Source0-md5: 289644694b36a7a19a478766c2763fc7
-BuildRequires: cmake
-BuildRequires: pkgconfig(glib-2.0)
+Patch0:                optflags.patch
+BuildRequires: cmake >= 2.8.0
+BuildRequires: pkgconfig(glib-2.0) >= 2.10
 BuildRequires: pkgconfig(libcurl)
 BuildRequires: pkgconfig(sqlite3)
+BuildRequires: rpmbuild(macros) >= 1.600
 Requires:      %{name}-libs = %{version}-%{release}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -54,11 +56,17 @@
 
 %prep
 %setup -qn %{name}
+%patch0 -p0
 
 %build
 install -d build
 cd build
+# NOTE: CMAKE_BUILD_TYPE is not functioning in this project, so we redefine 
them for _RELEASE
 %cmake \
+       -DCMAKE_C_FLAGS_RELEASE="%{rpmcflags}" \
+       -DCMAKE_EXE_LINKER_FLAGS_RELASE="%{rpmldflags}" \
+       -DCMAKE_SHARED_LINKER_FLAGS_RELASE="%{rpmldflags}" \
+       -DCMAKE_MODULE_LINKER_FLAGS_RELASE="%{rpmldflags}" \
        ../
 %{__make} VERBOSE=1
 
@@ -99,6 +107,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.2  2012/05/22 22:21:26  glen
+- optflags hacking
+
 Revision 1.1  2012/05/22 22:09:46  glen
 - new, based on opensuse package
   
http://download.opensuse.org/repositories/multimedia:/libs/openSUSE_12.1/src/glyr-0.9.9-4.1.src.rpm

================================================================
Index: packages/glyr/optflags.patch
diff -u /dev/null packages/glyr/optflags.patch:1.1
--- /dev/null   Wed May 23 00:21:32 2012
+++ packages/glyr/optflags.patch        Wed May 23 00:21:26 2012
@@ -0,0 +1,16 @@
+Description: Use default openSUSE optimization flags.
+Author: Kyrill Detinov <[email protected]>
+Index: CMakeLists.txt
+===================================================================
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -62,8 +62,8 @@ IF(CMAKE_COMPILER_IS_GNUCC)
+ ENDIF()
+ 
+ SET(COMMON_FLAGS "${GCC_ONLY_FLAGS} -Wall -Wextra -Wstrict-prototypes -W 
-Wno-unused-parameter -Wno-strict-prototypes -fvisibility=hidden")
+-SET(CMAKE_C_FLAGS_RELEASE "${COMMON_FLAGS} ${CMAKE_C_FLAGS} -Os 
${GCC_ONLY_OPT}")
+-SET(CMAKE_C_FLAGS_DEBUG   "${COMMON_FLAGS} ${CMAKE_C_FLAGS} -ggdb3")
++#SET(CMAKE_C_FLAGS_RELEASE "${COMMON_FLAGS} ${CMAKE_C_FLAGS} -Os 
${GCC_ONLY_OPT}")
++#SET(CMAKE_C_FLAGS_DEBUG   "${COMMON_FLAGS} ${CMAKE_C_FLAGS} -ggdb3")
+ SET(CMAKE_C_FLAGS "${COMMON_FLAGS} ${CMAKE_C_FLAGS}")
+ # ------------------------------------------------
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/packages/glyr/glyr.spec?r1=1.1&r2=1.2

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to