Ticket #40640: qucs-0.0.17.diff

File qucs-0.0.17.diff, 9.0 KB (added by ryandesign (Ryan Carsten Schmidt), 11 years ago)

the beginnings of a patch

  • files/patch-qucs-main.cpp.diff

     
    1 --- qucs/main.cpp.orig  2009-03-24 22:33:05.000000000 +0100
    2 +++ qucs/main.cpp       2009-03-24 23:53:40.000000000 +0100
    3 @@ -563,13 +563,14 @@
    4      QucsSettings.OctaveDir =
    5        QDir::convertSeparators (QucsDirStr + "/share/qucs/octave/");
    6    } else {
     1--- qucs/main.cpp.orig  2013-06-23 00:59:40.000000000 -0500
     2+++ qucs/main.cpp       2013-10-01 01:54:19.000000000 -0500
     3@@ -571,6 +571,7 @@
     4   if (var != NULL) {
     5     QDir QucsDir = QDir (var);
     6     QString QucsDirStr = QucsDir.canonicalPath ();
    77+    QucsSettings.AppDir = QDir::convertSeparators("@APPDIR@/");
    8      QucsSettings.BinDir = BINARYDIR;
    9      QucsSettings.BitmapDir = BITMAPDIR;
    10      QucsSettings.LangDir = LANGUAGEDIR;
    11      QucsSettings.LibDir = LIBRARYDIR;
    12      QucsSettings.OctaveDir = OCTAVEDIR;
     8     QucsSettings.BinDir =
     9       QDir::convertSeparators (QucsDirStr + "/bin/");
     10     QucsSettings.BitmapDir =
     11@@ -594,7 +595,7 @@
     12     QucsSettings.ExamplesDir = QDir(DOCDIR).canonicalPath()+"/examples/";
     13     QucsSettings.DocDir = DOCDIR;
    1314   }
    1415-  QucsSettings.Editor = QucsSettings.BinDir + "qucsedit";
    1516+  QucsSettings.Editor = QucsSettings.AppDir + "qucsedit.app/Contents/MacOS/qucsedit";
    16  
    1717   QucsWorkDir.setPath(QDir::homeDirPath()+QDir::convertSeparators ("/.qucs"));
    1818   QucsHomeDir.setPath(QDir::homeDirPath()+QDir::convertSeparators ("/.qucs"));
     19   loadSettings();
  • files/patch-configure.diff

     
    1 --- configure.orig      2009-06-09 23:25:33.000000000 +0200
    2 +++ configure   2009-06-09 23:26:55.000000000 +0200
    3 @@ -6214,7 +6214,7 @@
    4  $as_echo_n "checking for Qt headers... " >&6; }
    5  paths="$QTDIR/include /usr/local/qt/include /usr/include/qt /usr/include/qt3 \
    6    /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/X11/qt \
    7 -  /usr/X11R6/include/qt /usr/X11R6/include /sw/include/qt \
    8 +  /usr/X11R6/include/qt /usr/X11R6/include \
    9    /usr/X11R6/include/qt2 $prefix/include/qt3"
    10  for path in $paths; do
    11    if test -f "$path/qapplication.h"; then
    12 @@ -6278,9 +6278,9 @@
    13  $as_echo "checking for Qt... $QT_VER ($QT_MTS)" >&6; }
    14  { $as_echo "$as_me:$LINENO: checking for Qt library" >&5
    15  $as_echo_n "checking for Qt library... " >&6; }
    16 -paths="$QTDIR/lib $QTDIR/lib64 /usr/local/qt/lib /usr/lib/qt /usr/lib \
    17 +paths="$QTDIR/lib $QTDIR/lib64 /usr/lib/qt /usr/lib \
    18    /usr/X11R6/lib/X11/qt /usr/X11R6/lib/X11/qt /usr/X11R6/lib/qt \
    19 -  /usr/X11R6/lib /sw/lib /usr/lib64/qt /usr/X11R6/lib/qt2"
    20 +  /usr/X11R6/lib /usr/lib64/qt /usr/X11R6/lib/qt2"
    21  ac_ext=cpp
    22  ac_cpp='$CXXCPP $CPPFLAGS'
    23  ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
  • files/patch-qucs-qucs_actions.cpp.diff

     
    1 --- qucs/qucs_actions.cpp.orig  2009-03-24 23:02:53.000000000 +0100
    2 +++ qucs/qucs_actions.cpp       2009-03-25 00:09:46.000000000 +0100
    3 @@ -609,7 +609,7 @@
     1--- qucs/qucs_actions.cpp.orig  2013-06-23 00:59:40.000000000 -0500
     2+++ qucs/qucs_actions.cpp       2013-10-01 01:57:16.000000000 -0500
     3@@ -622,7 +622,7 @@
    44 void QucsApp::slotCallFilter()
    55 {
    6    QProcess *QucsFilter =
    7 -    new QProcess(QString(QucsSettings.BinDir + "qucsfilter"));
    8 +    new QProcess(QString(QucsSettings.AppDir + "qucsfilter.app/Contents/MacOS/qucsfilter"));
     6   Q3Process *QucsFilter =
     7-    new Q3Process(QString(QucsSettings.BinDir + "qucsfilter"));
     8+    new Q3Process(QString(QucsSettings.AppDir + "qucsfilter.app/Contents/MacOS/qucsfilter"));
    99   if(!QucsFilter->start()) {
    1010     QMessageBox::critical(this, tr("Error"),
    1111                           tr("Cannot start filter synthesis program!"));
    12 @@ -626,7 +626,7 @@
     12@@ -639,7 +639,7 @@
    1313 void QucsApp::slotCallLine()
    1414 {
    15    QProcess *QucsLine =
    16 -    new QProcess(QString(QucsSettings.BinDir + "qucstrans"));
    17 +    new QProcess(QString(QucsSettings.AppDir + "qucstrans.app/Contents/MacOS/qucstrans"));
     15   Q3Process *QucsLine =
     16-    new Q3Process(QString(QucsSettings.BinDir + "qucstrans"));
     17+    new Q3Process(QString(QucsSettings.AppDir + "qucstrans.app/Contents/MacOS/qucstrans"));
    1818   if(!QucsLine->start()) {
    1919     QMessageBox::critical(this, tr("Error"),
    2020                           tr("Cannot start line calculation program!"));
    21 @@ -643,7 +643,7 @@
     21@@ -656,7 +656,7 @@
    2222 void QucsApp::slotCallLibrary()
    2323 {
    24    QProcess *QucsLibrary =
    25 -    new QProcess(QString(QucsSettings.BinDir + "qucslib"));
    26 +    new QProcess(QString(QucsSettings.AppDir + "qucslib.app/Contents/MacOS/qucslib"));
     24   Q3Process *QucsLibrary =
     25-    new Q3Process(QString(QucsSettings.BinDir + "qucslib"));
     26+    new Q3Process(QString(QucsSettings.AppDir + "qucslib.app/Contents/MacOS/qucslib"));
    2727   if(!QucsLibrary->start()) {
    2828     QMessageBox::critical(this, tr("Error"),
    2929                           tr("Cannot start library program!"));
    30 @@ -668,7 +668,7 @@
     30@@ -681,7 +681,7 @@
    3131 void QucsApp::slotCallAtt()
    3232 {
    33    QProcess *QucsAtt =
    34 -    new QProcess(QString(QucsSettings.BinDir + "qucsattenuator"));
    35 +    new QProcess(QString(QucsSettings.AppDir + "qucsattenuator.app/Contents/MacOS/qucsattenuator"));
     33   Q3Process *QucsAtt =
     34-    new Q3Process(QString(QucsSettings.BinDir + "qucsattenuator"));
     35+    new Q3Process(QString(QucsSettings.AppDir + "qucsattenuator.app/Contents/MacOS/qucsattenuator"));
    3636   if(!QucsAtt->start()) {
    3737     QMessageBox::critical(this, tr("Error"),
    3838                           tr("Cannot start attenuator calculation program!"));
    39 @@ -696,7 +696,7 @@
     39@@ -709,7 +709,7 @@
    4040 void QucsApp::showHTML(const QString& Page)
    4141 {
    4242   QStringList com;
    4343-  com << QucsSettings.BinDir + "qucshelp" << Page;
    4444+  com << QucsSettings.AppDir + "qucshelp.app/Contents/MacOS/qucshelp" << Page;
    45    QProcess *QucsHelp = new QProcess(com);
     45   Q3Process *QucsHelp = new Q3Process(com);
    4646   QucsHelp->setCommunication(0);
    4747   if(!QucsHelp->start()) {
  • Portfile

     
    44PortSystem      1.0
    55
    66name                qucs
    7 version             0.0.16
     7version             0.0.17
    88categories          science electronics
    99license             GPL-2+
    1010maintainers         rowue openmaintainer
    1111platforms           darwin
    12 supported_archs     i386 ppc
     12
    1313description         an integrated circuit simulator
    1414long_description    Qucs is an integrated circuit simulator. \
    15     You can setup an circut with graphical user interface. \
    16     It's based on QT
     15                    You can set up a circuit with a graphical user interface.
     16
    1717homepage            http://qucs.sourceforge.net/
    18 master_sites        sourceforge
    19 checksums           md5     c916502171d422ab168fe5fc681b29d8 \
    20                     sha1    453143d511d2d75e115f4e03d32457446586d4ab \
    21                     rmd160  77624106f891d700c123d7a3f38b47ea2a0d60e1
     18master_sites        sourceforge:project/qucs/qucs/${version}
    2219
     20checksums           rmd160  4ac2056bd097155ec73bb119f6ffcaeb6848ba69 \
     21                    sha256  1fa0e6f2e8068c0800aa4dd3a25b41d18a6060619914c9787a20d21934089a70
    2322
    24 depends_lib         port:qt3-mac \
     23depends_build       port:pkgconfig
     24
     25depends_lib         port:qt4-mac \
    2526                    port:freehdl \
    2627                    port:libtool \
    2728                    port:iverilog \
    2829                    port:asco
     30
     31# iverilog is not universal
     32universal_variant   no
     33
    2934use_parallel_build  yes
    30 patchfiles          patch-configure.diff \
    31                     patch-qucs_qucsdigi.diff \
     35
     36patchfiles          patch-qucs_qucsdigi.diff \
    3237                    patch-qucs_qucsveri.diff \
    3338                    patch-qucs-main.cpp.diff \
    3439                    patch-qucs-main.h.diff \
    35                     patch-qucs-qucs_actions.cpp.diff
    36 #                    patch-Makefile.in.diff
     40                    patch-qucs-qucs_actions.cpp.diff
    3741
    3842post-patch {
    3943    reinplace "s|@APPDIR@|${applications_dir}|g" ${worksrcpath}/qucs/main.cpp
    40     reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/qucs/qucsdigi
    41     reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/qucs/qucsveri
     44    reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/qucs/qucsdigi ${worksrcpath}/qucs/qucsveri
    4245}
    4346
    4447post-destroot {
     
    5053        xinstall -m 0644 ${filespath}/Info.plist ${destroot}${applications_dir}/${Program}.app/Contents/
    5154        reinplace "s|@VERSION@|${version}|" ${destroot}${applications_dir}/${Program}.app/Contents/Info.plist
    5255        reinplace "s|@EXECUTABLE@|${Program}|" ${destroot}${applications_dir}/${Program}.app/Contents/Info.plist
    53         system "echo 'APPL????' > ${destroot}${applications_dir}/${Program}.app/Contents/PkgInfo"
     56        system "printf 'APPL????' > ${destroot}${applications_dir}/${Program}.app/Contents/PkgInfo"
    5457    }
    5558}
    56