Update of /cvsroot/fink/dists/10.4/unstable/main/finkinfo/sci
In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv24750

Modified Files:
        stellarium.info stellarium.patch 
Added Files:
        stellarium-0.10.2-3.info 
Log Message:
Renamed stellarium to stellarium-mac for consistency and provided dummy package 
for upgrading. Simplified package file and allowed for -mac and -x11 to be 
installed together. -mac variant now installs as an .app bundle in 
%p/Applications.

--- NEW FILE: stellarium-0.10.2-3.info ---
Package: stellarium
Version: 0.10.2
Revision: 3
Description: Obsolete upgrade package, do not use
Maintainer: Daniel Johnson <dan...@daniel-johnson.org>
Source: none
Depends: %n-mac | %n-x11, fink-obsolete-packages
CompileScript: echo "This is a dummy package." >README
InstallScript: true
DocFiles: README
DescDetail: <<
        This is a dummy package that depends on either
        %n-mac or %n-x11 and is for upgrade purposes only.
        <<
License: GPL2+
Homepage: http://stellarium.sourceforge.net/

Index: stellarium.patch
===================================================================
RCS file: /cvsroot/fink/dists/10.4/unstable/main/finkinfo/sci/stellarium.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- stellarium.patch    3 Apr 2009 00:04:30 -0000       1.2
+++ stellarium.patch    14 Jun 2009 19:37:44 -0000      1.3
@@ -1,85 +1,82 @@
-diff -ru stellarium-0.10.2/CMakeLists.txt stellarium-0.10.2.new/CMakeLists.txt
---- stellarium-0.10.2/CMakeLists.txt   2009-03-09 07:28:34.000000000 -0400
-+++ stellarium-0.10.2.new/CMakeLists.txt       2009-04-02 18:52:53.000000000 
-0400
-@@ -32,9 +32,7 @@
+diff -ru stellarium-0.10.2.orig/CMakeLists.txt stellarium-0.10.2/CMakeLists.txt
+--- stellarium-0.10.2.orig/CMakeLists.txt      2009-03-09 07:28:34.000000000 
-0400
++++ stellarium-0.10.2/CMakeLists.txt   2009-06-14 14:22:25.000000000 -0400
+@@ -32,9 +32,11 @@
  
  # best way to get to APPLE?
  IF(APPLE)
 - SET(CMAKE_INCLUDE_PATH 
"/usr/X11/include:/usr/X11/include/freetype2:/Developer/SDKs/MacOSX10.5.sdk/usr/X11/include:/Developer/SDKs/MacOSX10.5.sdk/usr/X11/include/freetype2:/sw/include:${CMAKE_INCLUDE_PATH}")
 - SET(CMAKE_LIBRARY_PATH 
"/Developer/SDKs/MacOSX10.5.sdk/usr/X11/lib:/sw/lib:${CMAKE_LIBRARY_PATH}")
 - SET(CMAKE_C_FLAGS "-fno-common -Wall -Wextra -Wno-unused-parameter -DMACOSX 
-I/Developer/SDKs/MacOSX10.5.sdk/usr/X11/include 
-I/Developer/SDKs/MacOSX10.5.sdk/usr/X11/include/freetype2")
-+ SET(CMAKE_C_FLAGS "-fno-common -Wall -Wextra -Wno-unused-parameter -DMACOSX")
++ IF(APPLE_APP)
++  SET(CMAKE_C_FLAGS "-fno-common -Wall -Wextra -Wno-unused-parameter -DMACOSX 
-DMACOSX_APP")
++ ELSE(APPLE_APP)
++  SET(CMAKE_C_FLAGS "-fno-common -Wall -Wextra -Wno-unused-parameter 
-DMACOSX")
++ ENDIF(APPLE_APP)
   SET(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS}")
   SET(CMAKE_EXE_LINKER_FLAGS "-dylib_file 
/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib")
  ENDIF()
-@@ -110,14 +108,8 @@
+@@ -110,14 +112,13 @@
  
  ########### Set some global variables ###########
  IF(UNIX AND NOT WIN32)
 -IF(APPLE)
 -  SET(CMAKE_INSTALL_PREFIX "/Users/Shared/stellarium/Stellarium.app/Contents")
 -  SET(INSTALL_DATADIR "${CMAKE_INSTALL_PREFIX}/Resources/data")
--  SET(INSTALL_LOCALEDIR "${CMAKE_INSTALL_PREFIX}/Resources/locale")
++IF(APPLE_APP)
++  SET(INSTALL_DATADIR "${CMAKE_INSTALL_PREFIX}/Resources")
+   SET(INSTALL_LOCALEDIR "${CMAKE_INSTALL_PREFIX}/Resources/locale")
 -ELSE(APPLE)
++ELSE(APPLE_APP)
    SET(INSTALL_DATADIR ${CMAKE_INSTALL_PREFIX}/share/stellarium)
    SET(INSTALL_LOCALEDIR ${CMAKE_INSTALL_PREFIX}/share/locale)
 -ENDIF(APPLE)
++ENDIF(APPLE_APP)
  ELSE()
    SET(INSTALL_DATADIR .)
    SET(INSTALL_LOCALEDIR ./locale)
-@@ -202,8 +194,4 @@
-  ADD_SUBDIRECTORY( sip ) 
+@@ -203,7 +204,7 @@
  ENDIF()
  
--########### Macosx Bundling ###############
+ ########### Macosx Bundling ###############
 -IF(APPLE)
--ADD_CUSTOM_TARGET(macosx_bundle bash util/macosx_bundle.sh 
${CMAKE_INSTALL_PREFIX} ${PROJECT_SOURCE_DIR} DEPENDS install WORKING_DIRECTORY 
${PROJECT_SOURCE_DIR} COMMENT "making the macosx bundle." VERBATIM)
--ENDIF()
++IF(APPLE_APP)
+ ADD_CUSTOM_TARGET(macosx_bundle bash util/macosx_bundle.sh 
${CMAKE_INSTALL_PREFIX} ${PROJECT_SOURCE_DIR} DEPENDS install WORKING_DIRECTORY 
${PROJECT_SOURCE_DIR} COMMENT "making the macosx bundle." VERBATIM)
+ ENDIF()
  
-diff -ru stellarium-0.10.2/src/core/StelFileMgr.cpp 
stellarium-0.10.2.new/src/core/StelFileMgr.cpp
---- stellarium-0.10.2/src/core/StelFileMgr.cpp 2009-03-09 07:28:33.000000000 
-0400
-+++ stellarium-0.10.2.new/src/core/StelFileMgr.cpp     2009-04-02 
19:14:53.000000000 -0400
-@@ -16,9 +16,6 @@
+diff -ru stellarium-0.10.2.orig/src/core/StelFileMgr.cpp 
stellarium-0.10.2/src/core/StelFileMgr.cpp
+--- stellarium-0.10.2.orig/src/core/StelFileMgr.cpp    2009-03-09 
07:28:33.000000000 -0400
++++ stellarium-0.10.2/src/core/StelFileMgr.cpp 2009-06-14 14:24:15.000000000 
-0400
+@@ -16,7 +16,7 @@
  # endif 
  #endif
  
 -#ifdef MACOSX
--#include "StelMacosxDirs.hpp"
--#endif
- 
- #include "StelFileMgr.hpp"
++#ifdef MACOSX_APP
+ #include "StelMacosxDirs.hpp"
+ #endif
  
-@@ -354,18 +351,10 @@
+@@ -354,7 +354,7 @@
        if (QFileInfo(CHECK_FILE).exists())
                return ".";
  
 -#if defined(MACOSX)
--      QFileInfo MacOSdir(QCoreApplication::applicationDirPath());
--      QDir ResourcesDir = MacOSdir.dir();
--      ResourcesDir.cd(QString("Resources"));
--      QFileInfo installLocation(ResourcesDir.absolutePath());
--      QFileInfo checkFile(installLocation.filePath() + QString("/") + 
QString(CHECK_FILE));
--#else
-       // Linux, BSD, Solaris etc.
-       // We use the value from the config.h filesystem
-       QFileInfo installLocation(QFile::decodeName(INSTALL_DATADIR));
-       QFileInfo checkFile(QFile::decodeName(INSTALL_DATADIR "/" CHECK_FILE));
--#endif
- 
-       if (checkFile.exists())
-       {
-@@ -405,7 +394,7 @@
++#if defined(MACOSX_APP)
+       QFileInfo MacOSdir(QCoreApplication::applicationDirPath());
+       QDir ResourcesDir = MacOSdir.dir();
+       ResourcesDir.cd(QString("Resources"));
+@@ -405,7 +405,7 @@
  QString StelFileMgr::getLocaleDir(void)
  {
        QFileInfo localePath;
 -#if defined(WIN32) || defined(CYGWIN) || defined(__MINGW32__) || 
defined(MINGW32) || defined(MACOSX)
-+#if defined(WIN32) || defined(CYGWIN) || defined(__MINGW32__) || 
defined(MINGW32)
++#if defined(WIN32) || defined(CYGWIN) || defined(__MINGW32__) || 
defined(MINGW32) || defined(MACOSX_APP)
        // Windows and MacOS X have the locale dir in the installation folder
        // TODO: check if this works with OSX
        localePath = QFileInfo(getInstallationDir() + "/locale");
-diff -ru stellarium-0.10.2/src/core/StelIniParser.hpp 
stellarium-0.10.2.new/src/core/StelIniParser.hpp
---- stellarium-0.10.2/src/core/StelIniParser.hpp       2009-03-09 
07:28:33.000000000 -0400
-+++ stellarium-0.10.2.new/src/core/StelIniParser.hpp   2009-04-02 
19:15:27.000000000 -0400
+diff -ru stellarium-0.10.2.orig/src/core/StelIniParser.hpp 
stellarium-0.10.2/src/core/StelIniParser.hpp
+--- stellarium-0.10.2.orig/src/core/StelIniParser.hpp  2009-03-09 
07:28:33.000000000 -0400
++++ stellarium-0.10.2/src/core/StelIniParser.hpp       2009-06-14 
14:25:03.000000000 -0400
 @@ -27,8 +27,6 @@
  // ourselves.
  #if defined(WIN32)
@@ -89,43 +86,59 @@
  #else
        static const QString stelEndl="\n";
  #endif
-diff -ru stellarium-0.10.2/src/core/StelTranslator.cpp 
stellarium-0.10.2.new/src/core/StelTranslator.cpp
---- stellarium-0.10.2/src/core/StelTranslator.cpp      2009-03-09 
07:28:33.000000000 -0400
-+++ stellarium-0.10.2.new/src/core/StelTranslator.cpp  2009-04-02 
19:16:28.000000000 -0400
-@@ -39,12 +39,8 @@
+diff -ru stellarium-0.10.2.orig/src/core/StelTranslator.cpp 
stellarium-0.10.2/src/core/StelTranslator.cpp
+--- stellarium-0.10.2.orig/src/core/StelTranslator.cpp 2009-03-09 
07:28:33.000000000 -0400
++++ stellarium-0.10.2/src/core/StelTranslator.cpp      2009-06-14 
14:26:22.000000000 -0400
+@@ -39,7 +39,7 @@
  QString StelTranslator::systemLangName;
  
  // Use system locale language by default
 -#if defined(MACOSX)
--#include "StelMacosxDirs.hpp"
--StelTranslator StelTranslator::globalTranslator = 
StelTranslator(PACKAGE_NAME, 
StelMacosxDirs::getApplicationResourcesDirectory().append( "/locale" ), 
"system");
--#else
- StelTranslator StelTranslator::globalTranslator = 
StelTranslator(PACKAGE_NAME, INSTALL_LOCALEDIR, "system");
--#endif
-+
- 
- #ifdef WIN32
- # include <windows.h>
-diff -ru stellarium-0.10.2/src/main.cpp stellarium-0.10.2.new/src/main.cpp
---- stellarium-0.10.2/src/main.cpp     2009-03-09 07:28:33.000000000 -0400
-+++ stellarium-0.10.2.new/src/main.cpp 2009-04-02 19:16:55.000000000 -0400
-@@ -26,9 +26,6 @@
++#if defined(MACOSX_APP)
+ #include "StelMacosxDirs.hpp"
+ StelTranslator StelTranslator::globalTranslator = 
StelTranslator(PACKAGE_NAME, 
StelMacosxDirs::getApplicationResourcesDirectory().append( "/locale" ), 
"system");
+ #else
+diff -ru stellarium-0.10.2.orig/src/main.cpp stellarium-0.10.2/src/main.cpp
+--- stellarium-0.10.2.orig/src/main.cpp        2009-03-09 07:28:33.000000000 
-0400
++++ stellarium-0.10.2/src/main.cpp     2009-06-14 14:27:21.000000000 -0400
+@@ -26,7 +26,7 @@
  #include <QDebug>
  #include <QGLFormat>
  #include <QPlastiqueStyle>
 -#ifdef MACOSX
--#include "StelMacosxDirs.hpp"
--#endif
++#ifdef MACOSX_APP
+ #include "StelMacosxDirs.hpp"
+ #endif
  
- //! @class GettextStelTranslator
- //! Provides i18n support through gettext.
-@@ -65,9 +62,6 @@
+@@ -65,7 +65,7 @@
        int argc2 = argc+2;
        QApplication app(argc2, argv2);
  
 -#ifdef MACOSX
--      StelMacosxDirs::addApplicationPluginDirectory();
--#endif
++#ifdef MACOSX_APP
+       StelMacosxDirs::addApplicationPluginDirectory();
+ #endif
        GettextStelTranslator trans;
-       app.installTranslator(&trans);
-       if (!QGLFormat::hasOpenGL())
+diff -ru stellarium-0.10.2.orig/util/macosx_bundle.sh 
stellarium-0.10.2/util/macosx_bundle.sh
+--- stellarium-0.10.2.orig/util/macosx_bundle.sh       2009-03-09 
07:28:34.000000000 -0400
++++ stellarium-0.10.2/util/macosx_bundle.sh    2009-06-14 14:17:15.000000000 
-0400
+@@ -17,19 +17,5 @@
+ rmdir ${CMAKE_INSTALL_PREFIX}/Resources/stellarium
+ 
+ 
+-mkdir ${CMAKE_INSTALL_PREFIX}/Frameworks
+-/usr/bin/perl util/pkgApp.pl ${CMAKE_INSTALL_PREFIX} MacOS/stellarium 
Frameworks 
+-cp -pr /Developer/Applications/Qt/plugins/{imageformats,iconengines} 
${CMAKE_INSTALL_PREFIX}/MacOS
+-for f in ${CMAKE_INSTALL_PREFIX}/MacOS/{imageformats,iconengines}/*.dylib; do
+-    fdir=`dirname $f`
+-    dir=`basename $fdir`
+-    base=`basename $f`
+-    #/usr/bin/install_name_tool -id "@executable_path/$dir/$base" $f
+-    for qt in `otool -L $f | egrep '  Qt' | cut -f 1 -d ' '`; do
+-      newt="@executable_path/../Frameworks/$qt"
+-      /usr/bin/install_name_tool -change $qt $newt $f
+-    done
+-done
+-
+ cp -pr $PROJECT_SOURCE_DIR/data/Icon.icns $CMAKE_INSTALL_PREFIX/Resources
+ cp -pr $PROJECT_SOURCE_DIR/data/{PkgInfo,Info.plist} $CMAKE_INSTALL_PREFIX

Index: stellarium.info
===================================================================
RCS file: /cvsroot/fink/dists/10.4/unstable/main/finkinfo/sci/stellarium.info,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- stellarium.info     3 Apr 2009 02:04:00 -0000       1.6
+++ stellarium.info     14 Jun 2009 19:37:44 -0000      1.7
@@ -1,18 +1,18 @@
 Info2: <<
-Package: stellarium%type_pkg[-x11]
+Package: stellarium-%type_pkg[qt]
 Version: 0.10.2
-Revision: 2
-Type: -x11 (boolean)
+Revision: 3
+Type: qt (mac x11)
 Description: Real time 3D sky renderer
 Maintainer: Daniel Johnson <dan...@daniel-johnson.org>
 Source: mirror:sourceforge:stellarium/stellarium-%v.tar.gz
 Source-MD5: c544fff9e75e9317055075b658ae5924
-PatchFile: %{ni}.patch
-PatchFile-MD5: fe6e6c4a88c682d83b8bdf785f48ada5
+PatchFile: stellarium.patch
+PatchFile-MD5: 3757e157d7c8014f1efd7086a964ff7e
 PatchScript: <<
        #!/bin/bash -ev
        %{default_script}
-       if [ %type_raw[-x11] = -x11 ]; then
+       if [ %type_raw[qt] = x11 ]; then
                perl -pi -e 's,-dylib_file,-L/usr/X11R6/lib -L%p/lib 
-dylib_file,' CMakeLists.txt
        fi
 <<
@@ -23,65 +23,59 @@
        freetype219,
        gettext-tools,
        libgettext3-dev,
-       ( %type_raw[-x11] = -x11 ) libgl-dev,
+       ( %type_raw[qt] = x11 ) libgl-dev,
        libiconv-dev,
        libjpeg,
        libpng3,
-       ( %type_raw[-x11] = . ) qt4-mac (>= 4.5.0-3),
-       ( %type_raw[-x11] = -x11 ) qt4-x11 (>= 4.5.0-3),
+       qt4-%type_pkg[qt] (>= 4.5.0-3),
        system-openssl-dev,
-       ( %type_raw[-x11] = -x11 ) x11-dev
+       ( %type_raw[qt] = x11 ) x11-dev
 <<
 Depends: <<
        freetype219-shlibs,
        libgettext3-shlibs,
-       ( %type_raw[-x11] = -x11 ) libgl-shlibs,
+       ( %type_raw[qt] = x11 ) libgl-shlibs,
        libiconv,
        libjpeg-shlibs,
        libpng3-shlibs,
-       ( %type_raw[-x11] = . ) qt4-mac-core-shlibs (>= 4.5.0-3),
-       ( %type_raw[-x11] = . ) qt4-mac-gui-shlibs (>= 4.5.0-3),
-       ( %type_raw[-x11] = -x11 ) qt4-x11-core-shlibs (>= 4.5.0-3),
-       ( %type_raw[-x11] = -x11 ) qt4-x11-gui-shlibs (>= 4.5.0-3),
-       ( %type_raw[-x11] = -x11 ) x11-shlibs
+       qt4-%type_pkg[qt]-core-shlibs (>= 4.5.0-3),
+       qt4-%type_pkg[qt]-gui-shlibs (>= 4.5.0-3),
+       ( %type_raw[qt] = x11 ) x11-shlibs
 <<
-Conflicts: stellarium, stellarium-x11
-Replaces: stellarium, stellarium-x11
+Conflicts: stellarium (<< 0.10.2-3), stellarium-x11 (<< 0.10.2-3)
+Replaces: stellarium (<< 0.10.2-3), stellarium-x11 (<< 0.10.2-3)
+
 GCC: 4.0
 CompileScript: <<
        #!/bin/bash -ev
        mkdir -p build/unix
        cd build/unix
        
-       if [ %type_raw[-x11] = -x11 ]; then
-               cmake -DCMAKE_INSTALL_PREFIX:PATH=%p \
-                       -DCMAKE_PREFIX_PATH:PATH=%p \
-                       -DQT_QMAKE_EXECUTABLE:FILEPATH=%p/lib/qt4-x11/bin/qmake 
\
-                       -DFreeType2_INCLUDE_DIR:PATH=%p/include/freetype2 \
-                       -DFreeType2_LIBRARIES:FILEPATH=%p/lib/libfreetype.dylib 
\
-                       
-DOPENSSL_INCLUDE_DIR:PATH=%p/lib/system-openssl/include \
-                       
-DOPENSSL_LIBRARIES:FILEPATH=%p/lib/system-openssl/lib/libssl.dylib \
-                       -DOPENGL_gl_LIBRARY:FILEPATH=/usr/X11R6/lib/libGL.dylib 
\
-                       
-DOPENGL_glu_LIBRARY:FILEPATH=/usr/X11R6/lib/libGLU.dylib \
-                       -DOPENGL_INCLUDE_DIR:PATH=/usr/X11R6/include \
-                       ../..
+       if [ %type_raw[qt] = x11 ]; then
+               params="-DOPENGL_gl_LIBRARY:FILEPATH=/usr/X11R6/lib/libGL.dylib 
-DOPENGL_glu_LIBRARY:FILEPATH=/usr/X11R6/lib/libGLU.dylib 
-DOPENGL_INCLUDE_DIR:PATH=/usr/X11R6/include -DCMAKE_INSTALL_PREFIX:PATH=%p"
        else
-               cmake -DCMAKE_INSTALL_PREFIX:PATH=%p \
-                       -DCMAKE_PREFIX_PATH:PATH=%p \
-                       -DQT_QMAKE_EXECUTABLE:FILEPATH=%p/lib/qt4-mac/bin/qmake 
\
+               params="-DAPPLE_APP=1 
-DCMAKE_INSTALL_PREFIX:PATH=%p/Applications/stellarium.app/Contents"
+       fi
+       
+       cmake   -DCMAKE_PREFIX_PATH:PATH=%p \
+                       
-DQT_QMAKE_EXECUTABLE:FILEPATH=%p/lib/qt4-%type_pkg[qt]/bin/qmake \
                        -DFreeType2_INCLUDE_DIR:PATH=%p/include/freetype2 \
                        -DFreeType2_LIBRARIES:FILEPATH=%p/lib/libfreetype.dylib 
\
                        
-DOPENSSL_INCLUDE_DIR:PATH=%p/lib/system-openssl/include \
                        
-DOPENSSL_LIBRARIES:FILEPATH=%p/lib/system-openssl/lib/libssl.dylib \
+                       $params \
                        ../..
-       fi
-       
        make
 <<
 InstallScript: <<
        #!/bin/bash -ev
        cd build/unix
        make install DESTDIR=%d
+       if [ "%type_pkg[qt]" = "mac" ]; then
+               cd ../..
+               /bin/bash util/macosx_bundle.sh 
%i/Applications/stellarium.app/Contents .
+               chmod -R o-w '%i/Applications/'
+       fi
 <<
 DescDetail: <<
   Stellarium renders a real time, photorealistic 3D image of the sky using
@@ -110,7 +104,11 @@
   Ecliptic and celestrial equator lines.
   Windowed and fullscreen modes.
 <<
+DescUsage: <<
+       stellarium-mac installs as %p/Applications/stellarium.app.
+       stellarium-x11 installs as %p/bin/stellarium.
+<<
 DocFiles: AUTHORS ChangeLog COPYING README
-License: GPL
+License: GPL2+
 Homepage: http://stellarium.sourceforge.net/
 <<


------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Fink-commits mailing list
Fink-commits@lists.sourceforge.net
http://news.gmane.org/gmane.os.apple.fink.cvs

Reply via email to