From 8975a433d13ecbc82d70b66e747d686216b98970 Mon Sep 17 00:00:00 2001 From: David Holl Date: Wed, 3 May 2017 15:30:17 -0700 Subject: [PATCH 1/8] Remove stray x --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 6fcc49a..6bb79c2 100644 --- a/build.sh +++ b/build.sh @@ -748,7 +748,7 @@ build_and_install_setup_py \ build_and_install_autotools \ ${P} \ - ${URL}x + ${URL} # # Install Cheetah From 7f415cb08c3c3ed6b3054140f17b90d0222d532b Mon Sep 17 00:00:00 2001 From: David Holl Date: Wed, 3 May 2017 15:32:18 -0700 Subject: [PATCH 2/8] Only set APP_DIR if it was unset or empty --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 6bb79c2..0ea22ec 100644 --- a/build.sh +++ b/build.sh @@ -51,7 +51,7 @@ XQUARTZ_APP_DIR=/Applications/Utilities/XQuartz.app BUILD_DIR="$(top_srcdir)" TMP_DIR=${BUILD_DIR}/tmp -APP_DIR=/Applications/GNURadio.app +APP_DIR="${APP_DIR:-"/Applications/GNURadio.app"}" CONTENTS_DIR=${APP_DIR}/Contents RESOURCES_DIR=${CONTENTS_DIR}/Resources INSTALL_DIR=${CONTENTS_DIR}/MacOS From 8122de045d44b4ac2b0037650ad65779ab1c13a7 Mon Sep 17 00:00:00 2001 From: David Holl Date: Wed, 3 May 2017 15:33:57 -0700 Subject: [PATCH 3/8] Check for Python 2.7 in /System --- build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/build.sh b/build.sh index 0ea22ec..f16ff37 100644 --- a/build.sh +++ b/build.sh @@ -474,6 +474,7 @@ cp ${BUILD_DIR}/scripts/ranlib-wrapper.sh ${INSTALL_DIR}/usr/bin/ranlib \ # [[ -d /Library/Frameworks/Python.framework/Versions/2.7 ]] \ + || [[ -d /System/Library/Frameworks/Python.framework/Versions/2.7 ]] \ || E "Python 2.7 is not installed. Download it here: https://www.python.org/downloads/" From 1bd724a0a9dc9707f9e08aa657e8b59d396f2bc0 Mon Sep 17 00:00:00 2001 From: David Holl Date: Wed, 3 May 2017 16:12:34 -0700 Subject: [PATCH 4/8] Fetch libpng from new primary site via https --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index f16ff37..6237bd3 100644 --- a/build.sh +++ b/build.sh @@ -792,7 +792,7 @@ cd # P=libpng-1.6.28 - URL='ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng16/libpng-1.6.28.tar.xz' + URL='https://ftp-osl.osuosl.org/pub/libpng/src/archive/xz/libpng16/libpng-1.6.28.tar.xz' build_and_install_autotools \ ${P} \ From 7c541e86f75586cb64db5e9619d26a1517765bee Mon Sep 17 00:00:00 2001 From: David Holl Date: Wed, 3 May 2017 17:35:34 -0700 Subject: [PATCH 5/8] Clear BRANCH before building wxPython --- build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/build.sh b/build.sh index 6237bd3..8e7f601 100644 --- a/build.sh +++ b/build.sh @@ -1269,6 +1269,7 @@ T=${P} P=wxPython-src-3.0.2.0 URL=https://svwh.dl.sourceforge.net/project/wxpython/wxPython/3.0.2.0/wxPython-src-3.0.2.0.tar.bz2 T=${P} + BRANCH="" if [ -f ${TMP_DIR}/.${P}.done ]; then I "already installed ${P}" From a8cf1c56c1ff99978ebebc282f298062ef1dcc79 Mon Sep 17 00:00:00 2001 From: David Holl Date: Wed, 3 May 2017 17:41:46 -0700 Subject: [PATCH 6/8] Use INSTALL_DIR for wxpython --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 8e7f601..553e7db 100644 --- a/build.sh +++ b/build.sh @@ -1295,7 +1295,7 @@ T=${P} CXXFLAGS="${CPPFLAGS} ${_extra_cflags} ${CXXFLAGS}" \ LDFLAGS="${LDFLAGS} ${_extra_libs}" \ ${PYTHON} setup.py WXPORT=gtk2 ARCH=x86_64 install \ - --prefix=/Applications/GNURadio.app/Contents/MacOS/usr \ + --prefix="${INSTALL_DIR}/usr" \ && D "copying wx.pth to ${PYTHONPATH}/wx.pth" \ && cp \ ${TMP_DIR}/${T}/wxPython/src/wx.pth \ From e1c2b8151f6dd9ccf3cb048b570022afbfe23b19 Mon Sep 17 00:00:00 2001 From: David Holl Date: Wed, 3 May 2017 19:41:54 -0700 Subject: [PATCH 7/8] Support custom APP_DIR via patch-script to fix QWT_INSTALL_PREFIX --- build.sh | 16 ++++++++++++---- .../qwt-6.1.3-00-use-gnuradio-app-prefix.patch | 13 ------------- ...qwt-6.1.3-00-use-gnuradio-app-prefix.sh.patch | 1 + 3 files changed, 13 insertions(+), 17 deletions(-) delete mode 100644 patches/qwt-6.1.3-00-use-gnuradio-app-prefix.patch create mode 100644 patches/qwt-6.1.3-00-use-gnuradio-app-prefix.sh.patch diff --git a/build.sh b/build.sh index 553e7db..ec6e285 100644 --- a/build.sh +++ b/build.sh @@ -204,10 +204,18 @@ function unpack() { fi for PP in $PATCHES; do - I "applying patch ${PP}" - cd ${TMP_DIR}/${T} \ - && git apply ${PP} \ - || E "git apply ${PP} failed" + if [ "${PP%".sh.patch"}" != "${PP}" ]; then + # This ends with .sh.patch, so source it: + I "applying script ${PP}" + cd ${TMP_DIR}/${T} \ + && . ${PP} \ + || E "sh ${PP} failed" + else + I "applying patch ${PP}" + cd ${TMP_DIR}/${T} \ + && git apply ${PP} \ + || E "git apply ${PP} failed" + fi done fi } diff --git a/patches/qwt-6.1.3-00-use-gnuradio-app-prefix.patch b/patches/qwt-6.1.3-00-use-gnuradio-app-prefix.patch deleted file mode 100644 index 7cf6e1a..0000000 --- a/patches/qwt-6.1.3-00-use-gnuradio-app-prefix.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/qwtconfig.pri b/qwtconfig.pri -index 2dc3715..22af2fb 100644 ---- a/qwtconfig.pri -+++ b/qwtconfig.pri -@@ -19,7 +19,7 @@ QWT_VERSION = $${QWT_VER_MAJ}.$${QWT_VER_MIN}.$${QWT_VER_PAT} - QWT_INSTALL_PREFIX = $$[QT_INSTALL_PREFIX] - - unix { -- QWT_INSTALL_PREFIX = /usr/local/qwt-$$QWT_VERSION -+ QWT_INSTALL_PREFIX = /Applications/GNURadio.app/Contents/MacOS/usr - # QWT_INSTALL_PREFIX = /usr/local/qwt-$$QWT_VERSION-qt-$$QT_VERSION - } - diff --git a/patches/qwt-6.1.3-00-use-gnuradio-app-prefix.sh.patch b/patches/qwt-6.1.3-00-use-gnuradio-app-prefix.sh.patch new file mode 100644 index 0000000..eb04224 --- /dev/null +++ b/patches/qwt-6.1.3-00-use-gnuradio-app-prefix.sh.patch @@ -0,0 +1 @@ +sed -i orig -e 's,^\([[:space:]]*QWT_INSTALL_PREFIX[[:space:]]*=[[:space:]]*\)\([^[:space:]].*\)$,\1'"${INSTALL_DIR}"'/usr,' qwtconfig.pri From 4030fc2ad77ac5f9e19ea098f0e24cdbf4f0c700 Mon Sep 17 00:00:00 2001 From: David Holl Date: Wed, 3 May 2017 20:21:11 -0700 Subject: [PATCH 8/8] qwt re-link appears no longer necessary after QWT_INSTALL_PREFIX bludgeoning --- build.sh | 16 ---------------- patches/qwt-bullshit.diff | 13 ------------- 2 files changed, 29 deletions(-) delete mode 100644 patches/qwt-bullshit.diff diff --git a/build.sh b/build.sh index ec6e285..33f5ede 100644 --- a/build.sh +++ b/build.sh @@ -1476,12 +1476,6 @@ URL=https://cytranet.dl.sourceforge.net/project/qwt/qwt/6.1.3/qwt-6.1.3.tar.bz2 T=${P} BRANCH="" -SHOULD_DO_REBUILD="" - -if [ ! -f ${TMP_DIR}/.${P}.done ]; then - SHOULD_DO_REBUILD="yes" -fi - QMAKE_CXX="${CXX}" \ QMAKE_CXXFLAGS="${CPPFLAGS}" \ QMAKE_LFLAGS="${LDFLAGS}" \ @@ -1492,16 +1486,6 @@ build_and_install_qmake \ ${T} \ ${BRANCH} -if [ "yes" = "${SHOULD_DO_REBUILD}" ]; then - cd ${TMP_DIR}/${T} \ - && I re-doing final link because qwt does not respect QMAKE_LFLAGS_SONAME \ - && git apply ${BUILD_DIR}/patches/qwt-bullshit.diff \ - && rm lib/* \ - && ${MAKE} \ - && ${MAKE} install \ - || E failed to build and install ${P} -fi - # # Install sip # diff --git a/patches/qwt-bullshit.diff b/patches/qwt-bullshit.diff deleted file mode 100644 index 3a9b02e..0000000 --- a/patches/qwt-bullshit.diff +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/Makefile b/src/Makefile -index 1dbdd42..cee30f8 100644 ---- a/src/Makefile -+++ b/src/Makefile -@@ -15,7 +15,7 @@ CFLAGS = -pipe -O2 -Wall -W -fPIC $(DEFINES) - CXXFLAGS = -pipe -O2 -Wall -W -fPIC $(DEFINES) - INCPATH = -I/Applications/GNURadio.app/Contents/MacOS/usr/mkspecs/macx-g++ -I. -I/Applications/GNURadio.app/Contents/MacOS/usr/include/QtCore -I/Applications/GNURadio.app/Contents/MacOS/usr/include/QtGui -I/Applications/GNURadio.app/Contents/MacOS/usr/include/QtOpenGL -I/Applications/GNURadio.app/Contents/MacOS/usr/include/QtSvg -I/Applications/GNURadio.app/Contents/MacOS/usr/include -I/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers -I/System/Library/Frameworks/AGL.framework/Headers -Imoc - LINK = @echo linking $@ && g++ --LFLAGS = -headerpad_max_install_names -single_module -dynamiclib -compatibility_version 6.1 -current_version 6.1.3 -install_name libqwt.6.dylib -+LFLAGS = -headerpad_max_install_names -single_module -dynamiclib -compatibility_version 6.1 -current_version 6.1.3 -install_name /Applications/GNURadio.app/Contents/MacOS/usr/lib/libqwt.6.dylib - LIBS = $(SUBLIBS) -L/Applications/GNURadio.app/Contents/MacOS/usr/lib -lQtSvg -L/Applications/GNURadio.app/Contents/MacOS/usr/lib -lQtOpenGL -lQtGui -lQtCore -framework OpenGL -framework AGL - AR = ar cq - RANLIB = ranlib -s