Browse Source

Allow setting CXXFLAGS on the qmake command line.
Don't install KTIGCC into $TIGCC anymore, instead use $PREFIX (can also be set on the qmake command line).
Handle ./configure --prefix=foo.
Fedora RPM specfile: Require at least kdelibs 3.91.0.


git-svn-id: file:///var/svn/tigccpp/trunk@1186 9552661e-59e3-4036-b4f2-dbe53926924f

kevinkofler 17 years ago
parent
commit
68ba723603
4 changed files with 33 additions and 16 deletions
  1. 5 1
      ktigcc/NEWS
  2. 7 1
      ktigcc/configure
  3. 11 8
      ktigcc/fedora/ktigcc.spec
  4. 10 6
      ktigcc/ktigcc.pro

+ 5 - 1
ktigcc/NEWS

@@ -1,6 +1,6 @@
 This is a summary of the changes in KTIGCC since the first alpha release:
 
-CVS HEAD (2007-07-02):
+CVS HEAD (2007-07-09):
 
 * Added a full changelog (generated from CVS logs).
 * Fixed stray indentation at the end of the line when autoclosing a curly brace
@@ -27,6 +27,10 @@ CVS HEAD (2007-07-02):
 * Ctrl+Return now works for "Open file at cursor" (not just Ctrl+Numpad Enter)
 * Now generating smaller syntax highlighting descriptions for mixes of
   case-sensitive and case-insensitive word lists (using new KatePart feature).
+* KTIGCC no longer installs into the $TIGCC prefix, instead a regular prefix is
+  used. The default is /usr/local. It can be set by setting the $PREFIX
+  environment variable or setting it in the qmake command line (e.g.
+  qmake-qt4 PREFIX=/usr).
 
 
 KTIGCC 1.06 (2006-11-25):

+ 7 - 1
ktigcc/configure

@@ -1,3 +1,9 @@
 #!/bin/sh
-qmake-qt4
+QMAKE_ARGS=""
+if test ! -z "$1"
+then case "$1" in
+ --prefix=*) QMAKE_ARGS=`echo $1 | sed 's/^--prefix/PREFIX/'` ;;
+esac
+fi
+qmake-qt4 $QMAKE_ARGS
 if [ $? == 127 ]; then echo "error: Qt 4 required"; fi

+ 11 - 8
ktigcc/fedora/ktigcc.spec

@@ -1,5 +1,3 @@
-%define tigccdir /usr/local/tigcc
-
 Name: ktigcc
 Version: 1.80
 Release: 1
@@ -8,8 +6,8 @@ Packager: Kevin Kofler <Kevin@tigcc.ticalc.org>
 Source: %{name}-%{version}.tar.bz2
 Group: Development/Tools
 License: GPL
-BuildRequires: qt4-devel >= 4.2.0 kdelibs4-devel = 3.90.1 glib2-devel >= 2.10.0 libticonv-devel >= 20060723 libticables2-devel >= 20060723 libtifiles2-devel >= 20060723 libticalcs2-devel >= 20060723 desktop-file-utils >= 0.10
-Requires: kdelibs4 = 3.90.1 kdebase4 = 3.90.1 tigcc >= 1:0.96b07r1 ktigcc-completion-data >= 0.96b07r1 qt4-doc ctags
+BuildRequires: qt4-devel >= 4.2.0 kdelibs4-devel = 3.91.0 glib2-devel >= 2.10.0 libticonv-devel >= 20060723 libticables2-devel >= 20060723 libtifiles2-devel >= 20060723 libticalcs2-devel >= 20060723 desktop-file-utils >= 0.10
+Requires: kdelibs4 = 3.91.0 kdebase4 = 3.91.0 tigcc >= 1:0.96b07r1 ktigcc-completion-data >= 0.96b07r1 qt4-doc ctags
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Summary: KTIGCC is an IDE for TIGCC using KDE
 %description
@@ -19,7 +17,7 @@ KTIGCC is an IDE for the TIGCC cross-toolchain on *nix/X11 platforms, using the
 %setup
 
 %build
-CXXFLAGS="$RPM_OPT_FLAGS" qmake-qt4
+qmake-qt4 PREFIX="%{_prefix}" CXXFLAGS="$RPM_OPT_FLAGS"
 make
 
 %install
@@ -52,7 +50,7 @@ GenericName=TIGCC IDE for KDE
 Encoding=UTF-8
 Version=1.0
 Type=Application
-Exec=%{tigccdir}/bin/ktigcc
+Exec=%{_bindir}/ktigcc
 Icon=ktigcc
 Terminal=false
 Categories=Development;
@@ -105,7 +103,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(-, root, root)
-%{tigccdir}/bin/ktigcc
+%{_bindir}/ktigcc
 %{_datadir}/icons/hicolor/16x16/apps/ktigcc.png
 %{_datadir}/icons/hicolor/16x16/mimetypes/application-x-tigcc-project.png
 %{_datadir}/icons/hicolor/16x16/mimetypes/gnome-mime-application-x-tigcc-project.png
@@ -115,9 +113,14 @@ rm -rf $RPM_BUILD_ROOT
 %{_datadir}/applications/tigcc-ktigcc.desktop
 %{_datadir}/mime/packages/ktigcc.xml
 %{_datadir}/mimelnk/application/x-tigcc-project.desktop
-%doc %{tigccdir}/doc/ktigcc
+%doc %{_datadir}/doc/ktigcc
 
 %changelog
+* Mon Jul 9 2007 Kevin Kofler <Kevin@tigcc.ticalc.org>
+Pass CXXFLAGS on the qmake command line instead of the environment.
+Install into PREFIX=/usr.
+Require at least kdelibs 3.91.0.
+
 * Mon Apr 30 2007 Kevin Kofler <Kevin@tigcc.ticalc.org>
 Use standard icon name for the mimetype icon symlink.
 Add compatibility symlink with the legacy name with the gnome-mime- prefix.

+ 10 - 6
ktigcc/ktigcc.pro

@@ -157,16 +157,20 @@ HAVE_TICALCS = $$system(pkg-config --atleast-version=$$TICALCS_MINVERSION ticalc
 PKGCONFIG_CFLAGS += $$system(pkg-config --cflags ticalcs2)
 LIBS += $$system(pkg-config --libs ticalcs2)
 
-TIGCC = $$(TIGCC)
-isEmpty(TIGCC) {
-  TIGCC = /usr/local/tigcc
+isEmpty(PREFIX) {
+  PREFIX = $$(PREFIX)
 }
-target.path = $$TIGCC/bin
-documentation.path = $$TIGCC/doc/ktigcc
+isEmpty(PREFIX) {
+  PREFIX = /usr/local
+}
+target.path = $$PREFIX/bin
+documentation.path = $$PREFIX/share/doc/ktigcc
 documentation.files = COPYING NEWS ChangeLog
 INSTALLS += target documentation
 
-CXXFLAGS = $$(CXXFLAGS)
+isEmpty(CXXFLAGS) {
+  CXXFLAGS = $$(CXXFLAGS)
+}
 isEmpty(CXXFLAGS) {
   debug {
     CXXFLAGS = -Os -g