소스 검색

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.
Drop obsolete TAR_OPTIONS=--wildcards workaround.


git-svn-id: file:///var/svn/tigccpp/branches/ktigcc-1-branch@1187 9552661e-59e3-4036-b4f2-dbe53926924f

kevinkofler 17 년 전
부모
커밋
ae4ab3d9ac
4개의 변경된 파일31개의 추가작업 그리고 17개의 파일을 삭제
  1. 5 1
      ktigcc/NEWS
  2. 7 1
      ktigcc/configure
  3. 8 6
      ktigcc/fedora/ktigcc.spec
  4. 11 9
      ktigcc/ktigcc.pro

+ 5 - 1
ktigcc/NEWS

@@ -1,12 +1,16 @@
 This is a summary of the changes in KTIGCC since the first alpha release:
 
-CVS ktigcc-1-branch (2007-07-02):
+KTIGCC 1.08 (2007-07-09):
 
 * KDElibs 3.5.7 or higher are now required.
 * Ctrl+Return now works for "Open file at cursor" (not just Ctrl+Numpad Enter)
 * Fixed extra newline incorrectly added each time a file is saved.
 * 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.07 (2007-04-03):

+ 7 - 1
ktigcc/configure

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

+ 8 - 6
ktigcc/fedora/ktigcc.spec

@@ -1,5 +1,3 @@
-%define tigccdir /usr/local/tigcc
-
 Name: ktigcc
 Version: 1.08
 Release: 1
@@ -19,7 +17,7 @@ KTIGCC is an IDE for the TIGCC cross-toolchain on *nix/X11 platforms, using the
 %setup -n %{name}
 
 %build
-CXXFLAGS="$RPM_OPT_FLAGS" qmake
+qmake 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,13 @@ 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.
+
 * Mon Jul 2 2007 Kevin Kofler <Kevin@tigcc.ticalc.org>
 Bump version to 1.08.
 Require at least kdelibs 3.5.7 (needed for case-insensitive keyword lists).

+ 11 - 9
ktigcc/ktigcc.pro

@@ -147,16 +147,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
@@ -175,8 +179,6 @@ distbz2.target = dist-bzip2
 distbz2.commands = zcat ktigcc.tar.gz | bzip2 --best -c > ktigcc.tar.bz2
 distbz2.depends = dist
 rpm.target = rpm
-# The TAR_OPTIONS=--wildcards is a workaround for rpmbuild 4.4.2 being
-# incompatible with tar 1.15.91 (Fedora bug #206841).
-rpm.commands = TAR_OPTIONS=--wildcards rpmbuild -ta ktigcc.tar.bz2
+rpm.commands = rpmbuild -ta ktigcc.tar.bz2
 rpm.depends = distbz2
 QMAKE_EXTRA_UNIX_TARGETS += distbz2 rpm