Ticket #40640: qucs_0.0.17.diff

File qucs_0.0.17.diff, 15.5 KB (added by rowue@…, 11 years ago)

Patch to get qucs-0.0.17 working

  • 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 \
    27                     port:iverilog \
    28                     port:asco
     28                    port:iverilog
     29
     30# iverilog is not universal
     31universal_variant   no
     32
    2933use_parallel_build  yes
    30 patchfiles          patch-configure.diff \
     34
     35patchfiles          patch-Makefile.in.diff \
    3136                    patch-qucs_qucsdigi.diff \
    3237                    patch-qucs_qucsveri.diff \
    3338                    patch-qucs-main.cpp.diff \
     39                    patch-qucs-filter-qf_filter.cpp.diff \
     40                    patch-asco-configure.diff \
    3441                    patch-qucs-main.h.diff \
    35                     patch-qucs-qucs_actions.cpp.diff
    36 #                    patch-Makefile.in.diff
     42                    patch-qucs-qucs_actions.cpp.diff
    3743
    3844post-patch {
    3945    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
     46    reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/qucs/qucsdigi ${worksrcpath}/qucs/qucsveri
    4247}
    4348
    4449post-destroot {
    4550    foreach Program {qucs qucsedit qucsfilter qucshelp qucslib qucstrans qucsattenuator} {
    46         xinstall -m 755 -d ${destroot}${applications_dir}/${Program}.app/Contents/MacOS
     51        xinstall -m 755 -d  ${destroot}${applications_dir}/${Program}.app/Contents/MacOS
    4752        move ${destroot}${prefix}/bin/${Program} ${destroot}${applications_dir}/${Program}.app/Contents/MacOS/
    48         xinstall -m 755 -d ${destroot}${applications_dir}/${Program}.app/Contents/Resources
     53        xinstall -m 755 -d  ${destroot}${applications_dir}/${Program}.app/Contents/Resources
    4954        xinstall -m 0644 ${filespath}/${Program}.icns ${destroot}${applications_dir}/${Program}.app/Contents/Resources
    5055        xinstall -m 0644 ${filespath}/Info.plist ${destroot}${applications_dir}/${Program}.app/Contents/
    5156        reinplace "s|@VERSION@|${version}|" ${destroot}${applications_dir}/${Program}.app/Contents/Info.plist
    5257        reinplace "s|@EXECUTABLE@|${Program}|" ${destroot}${applications_dir}/${Program}.app/Contents/Info.plist
    53         system "echo 'APPL????' > ${destroot}${applications_dir}/${Program}.app/Contents/PkgInfo"
     58        system "printf 'APPL????' > ${destroot}${applications_dir}/${Program}.app/Contents/PkgInfo"
    5459    }
    5560}
    56 
  • files/patch-Makefile.in.diff

     
    1 --- Makefile.in.orig    2009-06-09 20:14:07.000000000 +0200
    2 +++ Makefile.in 2009-06-09 21:35:12.000000000 +0200
    3 @@ -105,8 +105,6 @@
    4  CC = @CC@
    5  CCDEPMODE = @CCDEPMODE@
    6  CFLAGS = @CFLAGS@
    7 -COND_MACOSX_FALSE = @COND_MACOSX_FALSE@
    8 -COND_MACOSX_TRUE = @COND_MACOSX_TRUE@
    9  COND_WIN32_FALSE = @COND_WIN32_FALSE@
    10  COND_WIN32_TRUE = @COND_WIN32_TRUE@
    11  CPP = @CPP@
    12 @@ -219,15 +217,6 @@
     1--- Makefile.in.orig    2013-10-07 20:43:47.000000000 +0200
     2+++ Makefile.in 2013-10-07 20:45:52.000000000 +0200
     3@@ -795,54 +795,6 @@
     4        tags-recursive uninstall uninstall-am uninstall-hook
    135 
    14  EXTRA_DIST = autogen.sh depcomp PLATFORMS RELEASE Info.plist
    156 
    16 -# MacOSX specific installation of applications
    17 -@COND_MACOSX_TRUE@app_PROGS = $(top_builddir)/qucs/qucs \
    18 -@COND_MACOSX_TRUE@  $(top_builddir)/qucs-attenuator/qucsattenuator \
    19 -@COND_MACOSX_TRUE@  $(top_builddir)/qucs-filter/qucsfilter \
    20 -@COND_MACOSX_TRUE@  $(top_builddir)/qucs-help/qucshelp \
    21 -@COND_MACOSX_TRUE@  $(top_builddir)/qucs-lib/qucslib \
    22 -@COND_MACOSX_TRUE@  $(top_builddir)/qucs-edit/qucsedit \
    23 -@COND_MACOSX_TRUE@  $(top_builddir)/qucs-transcalc/qucstrans
     7-@COND_MACOSX_TRUE@install-exec-hook: mac-install-apps mac-deploy-framework
    248-
    25  CLEANFILES = *~ *.rej *.orig
    26  MAINTAINERCLEANFILES = aclocal.m4 config.h.in configure Makefile.in \
    27          stamp-h.in stamp-h[0-9].in
    28 @@ -603,7 +592,6 @@
    29  
    30  install-exec-am:
    31         @$(NORMAL_INSTALL)
    32 -       $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
    33  
    34  install-info: install-info-recursive
    35  
    36 @@ -651,65 +639,6 @@
    37         uninstall-info-am
    38  
    39  
    40 -@COND_MACOSX_TRUE@install-exec-hook: mac-install-apps mac-install-framework
    41 -
    429-@COND_MACOSX_TRUE@mac-install-apps:
    4310-@COND_MACOSX_TRUE@     @echo "Creating MacOSX applications...";
    4411-@COND_MACOSX_TRUE@     @list='$(app_PROGS)'; for file in $$list; do \
     
    6936-@COND_MACOSX_TRUE@     chmod +x $(bindir)/$$app; \
    7037-@COND_MACOSX_TRUE@     done
    7138-
    72 -@COND_MACOSX_TRUE@mac-install-framework:
     39-@COND_MACOSX_TRUE@mac-deploy-framework:
    7340-@COND_MACOSX_TRUE@     @echo "Copying and setting up MacOSX/Qt framework...";
    74 -@COND_MACOSX_TRUE@     @if test -e "$(QTDIR)/lib/libqt.3.dylib"; then \
    75 -@COND_MACOSX_TRUE@       qtlib="$(QTDIR)/lib/libqt.3.dylib"; fi && \
    76 -@COND_MACOSX_TRUE@     if test -e "$(QTDIR)/lib/libqt-mt.3.dylib"; then \
    77 -@COND_MACOSX_TRUE@       qtlib="$(QTDIR)/lib/libqt-mt.3.dylib"; fi && \
    78 -@COND_MACOSX_TRUE@     if ! test -z "$$qtlib"; then \
    79 -@COND_MACOSX_TRUE@       $(mkinstalldirs) "$(bindir)/qucs.app/Contents/Frameworks"; \
    80 -@COND_MACOSX_TRUE@       cp "$$qtlib" "$(bindir)/qucs.app/Contents/Frameworks/"; \
    81 -@COND_MACOSX_TRUE@       qtlib=`basename $$qtlib`; \
    82 -@COND_MACOSX_TRUE@       install_name_tool -id "@executable_path/../Frameworks/$$qtlib" \
    83 -@COND_MACOSX_TRUE@         "$(bindir)/qucs.app/Contents/Frameworks/$$qtlib"; \
    84 -@COND_MACOSX_TRUE@       list='$(app_PROGS)'; for file in $$list; do \
    85 -@COND_MACOSX_TRUE@       app=`basename $$file` && \
    86 -@COND_MACOSX_TRUE@       install_name_tool -change $$qtlib \
    87 -@COND_MACOSX_TRUE@         "@executable_path/../../../qucs.app/Contents/Frameworks/$$qtlib" \
    88 -@COND_MACOSX_TRUE@         "$(bindir)/$$app.app/Contents/MacOS/$$app"; \
    89 -@COND_MACOSX_TRUE@       done; \
    90 -@COND_MACOSX_TRUE@     fi
     41-@COND_MACOSX_TRUE@     @list='$(app_PROGS)'; for file in $$list; do \
     42-@COND_MACOSX_TRUE@     app=`basename $$file`; \
     43-@COND_MACOSX_TRUE@     echo "running: macdeployqt $(bindir)/$${app}.app"; \
     44-@COND_MACOSX_TRUE@     macdeployqt $(bindir)/$$app.app; \
     45-@COND_MACOSX_TRUE@     done
    9146-
    9247-@COND_MACOSX_TRUE@uninstall-hook:
    9348-@COND_MACOSX_TRUE@     @list='$(app_PROGS)'; for file in $$list; do \
     
    9651-@COND_MACOSX_TRUE@     done
    9752-@COND_MACOSX_FALSE@install-exec-hook:
    9853-@COND_MACOSX_FALSE@uninstall-hook:
     54-
    9955 # Tell versions [3.59,3.63) of GNU make to not export all variables.
    10056 # Otherwise a system limit (for SysV at least) may be exceeded.
    10157 .NOEXPORT:
  • files/patch-asco-configure.diff

     
     1--- asco/configure      2013-10-07 19:16:20.000000000 +0200
     2+++ asco/configure      2013-10-07 19:16:30.000000000 +0200
     3@@ -4042,6 +4211,12 @@
     4   fi
     5 fi
     6 
     7+case $host_os in
     8+  *darwin*)
     9+  CFLAGS="$CFLAGS -DUNIX -I/usr/include/malloc"
     10+  ;;
     11+esac
     12+
     13 # Extract the first word of "mpicc", so it can be a program name with args.
     14 set dummy mpicc; ac_word=$2
     15 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  • 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-filter-qf_filter.cpp.diff

     
     1--- qucs-filter/qf_filter.cpp
     2+++ qucs-filter/qf_filter.cpp
     3@@ -43,19 +43,19 @@ qf_filter::qf_filter () :
     4   ncomp (0), Comp (NULL) {
     5 }
     6 
     7-qf_filter::qf_filter (int n = 3, qfk k = UNDEF, qft t = LOWPASS) :
     8+qf_filter::qf_filter (int n, qfk k, qft t) :
     9   type (t), kind (k), ord (n), fc (0), bw (0), imp (1),
     10   ncomp (0), Comp (NULL) {
     11 }
     12 
     13-qf_filter::qf_filter (qfk k = UNDEF, qft t = LOWPASS, qf_double_t r = 1,
     14+qf_filter::qf_filter (qfk k, qft t, qf_double_t r,
     15                      qf_double_t f = 1, qf_double_t b = 0) :
     16   type (t), kind (k), fc (f), bw (b), imp (r), ncomp (0), Comp (NULL) {
     17   fstart = fc - bw / 2;
     18   fstop  = fc + bw / 2;
     19 }
     20 
     21-qf_filter::qf_filter (qfk k = UNDEF, qft t = LOWPASS) :
     22+qf_filter::qf_filter (qfk k, qft t) :
     23   type (t), kind (k), ord (0), fc (0), bw (0), imp (1),
     24   ncomp (0), Comp (NULL) {
     25 }
  • 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-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()) {