diff options
author | Alyssa Ross <hi@alyssa.is> | 2020-01-11 23:37:02 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2020-01-11 23:41:30 +0000 |
commit | 6c557e3f1c28cf87e9fba232811d6875dd1399c1 (patch) | |
tree | 035a071d5d8980df6de0fa42e2ef8fc0cce7055e /nixpkgs/pkgs/development/libraries/qscintilla | |
parent | da7500bc026e937ac7fce7b50f67a0e1765737a7 (diff) | |
parent | e4134747f5666bcab8680aff67fa3b63384f9a0f (diff) | |
download | nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar.gz nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar.bz2 nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar.lz nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar.xz nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.tar.zst nixlib-6c557e3f1c28cf87e9fba232811d6875dd1399c1.zip |
Merge commit 'e4134747f5666bcab8680aff67fa3b63384f9a0f'
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/qscintilla')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/qscintilla/default.nix | 59 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/libraries/qscintilla/fix-qt4-build.patch | 11 |
2 files changed, 43 insertions, 27 deletions
diff --git a/nixpkgs/pkgs/development/libraries/qscintilla/default.nix b/nixpkgs/pkgs/development/libraries/qscintilla/default.nix index 43f0e431bb15..a8be20b73b12 100644 --- a/nixpkgs/pkgs/development/libraries/qscintilla/default.nix +++ b/nixpkgs/pkgs/development/libraries/qscintilla/default.nix @@ -4,22 +4,26 @@ , fixDarwinDylibNames }: -# Fix Xcode 8 compilation problem -let xcodePatch = - fetchurl { url = "https://raw.githubusercontent.com/Homebrew/formula-patches/a651d71/qscintilla2/xcode-8.patch"; - sha256 = "1a88309fdfd421f4458550b710a562c622d72d6e6fdd697107e4a43161d69bc9"; }; -in -stdenv.mkDerivation rec { - pname = "qscintilla"; - version = "2.9.4"; +let + # Fix Xcode 8 compilation problem + xcodePatch = fetchurl { + url = "https://raw.githubusercontent.com/Homebrew/formula-patches/a651d71/qscintilla2/xcode-8.patch"; + sha256 = "1a88309fdfd421f4458550b710a562c622d72d6e6fdd697107e4a43161d69bc9"; + }; + + pname = "qscintilla-qt${if withQt5 then "5" else "4"}"; + version = "2.11.2"; - name = "${pname}-${if withQt5 then "qt5" else "qt4"}-${version}"; +in stdenv.mkDerivation rec { + inherit pname version; src = fetchurl { - url = "mirror://sourceforge/pyqt/QScintilla2/QScintilla-${version}/QScintilla_gpl-${version}.zip"; - sha256 = "04678skipydx68zf52vznsfmll2v9aahr66g50lcqbr6xsmgr1yi"; + url = "https://www.riverbankcomputing.com/static/Downloads/QScintilla/${version}/QScintilla_gpl-${version}.tar.gz"; + sha256 = "18glb2v07mwfz6p8qmwhzcaaczyc36x3gn9wx8ndm7q6d93xr6q2"; }; + sourceRoot = "QScintilla_gpl-${version}/Qt4Qt5"; + buildInputs = [ (if withQt5 then qtbase else qt4) ]; propagatedBuildInputs = lib.optional (withQt5 && stdenv.isDarwin) qtmacextras; @@ -28,24 +32,25 @@ stdenv.mkDerivation rec { ++ (if withQt5 then [ qmake ] else [ qmake4Hook ]) ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; + patches = (lib.optional (stdenv.isDarwin && withQt5) xcodePatch) ++ + (lib.optional (!withQt5) ./fix-qt4-build.patch ); - patches = lib.optional (stdenv.isDarwin && withQt5) [ xcodePatch ]; + # Make sure that libqscintilla2.so is available in $out/lib since it is expected + # by some packages such as sqlitebrowser + postFixup = '' + ln -s $out/lib/libqscintilla2_qt?.so $out/lib/libqscintilla2.so + ''; enableParallelBuilding = true; - preConfigure = '' - cd Qt4Qt5 - sed -i qscintilla.pro \ - -e "s,\$\$\\[QT_INSTALL_LIBS\\],$out/lib," \ - -e "s,\$\$\\[QT_INSTALL_HEADERS\\],$out/include/," \ - -e "s,\$\$\\[QT_INSTALL_TRANSLATIONS\\],$out/translations," \ - ${if withQt5 then '' - -e "s,\$\$\\[QT_HOST_DATA\\]/mkspecs,$out/mkspecs," \ - -e "s,\$\$\\[QT_INSTALL_DATA\\]/mkspecs,$out/mkspecs," \ - -e "s,\$\$\\[QT_INSTALL_DATA\\],$out/share," - '' else '' - -e "s,\$\$\\[QT_INSTALL_DATA\\],$out/share/qt," - ''} + postPatch = '' + substituteInPlace qscintilla.pro \ + --replace '$$[QT_INSTALL_LIBS]' $out/lib \ + --replace '$$[QT_INSTALL_HEADERS]' $out/include \ + --replace '$$[QT_INSTALL_TRANSLATIONS]' $out/translations \ + --replace '$$[QT_HOST_DATA]/mkspecs' $out/mkspecs \ + --replace '$$[QT_INSTALL_DATA]/mkspecs' $out/mkspecs \ + --replace '$$[QT_INSTALL_DATA]' $out/share${lib.optionalString (! withQt5) "/qt"} ''; meta = with stdenv.lib; { @@ -64,9 +69,9 @@ stdenv.mkDerivation rec { proportional fonts, bold and italics, multiple foreground and background colours and multiple fonts. ''; - homepage = http://www.riverbankcomputing.com/software/qscintilla/intro; + homepage = https://www.riverbankcomputing.com/software/qscintilla/intro; license = with licenses; [ gpl2 gpl3 ]; # and commercial - platforms = platforms.unix; maintainers = with maintainers; [ peterhoeg ]; + platforms = platforms.unix; }; } diff --git a/nixpkgs/pkgs/development/libraries/qscintilla/fix-qt4-build.patch b/nixpkgs/pkgs/development/libraries/qscintilla/fix-qt4-build.patch new file mode 100644 index 000000000000..520a55b1ea21 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/qscintilla/fix-qt4-build.patch @@ -0,0 +1,11 @@ +diff -ur QScintilla_gpl-2.11.2/Qt4Qt5/Qsci/qsciscintillabase.h QScintilla_gpl-2.11.2-fix/Qt4Qt5/Qsci/qsciscintillabase.h +--- Qt4Qt5/Qsci/qsciscintillabase.h 2019-06-25 14:49:27.000000000 +0200 ++++ Qt4Qt5-fix/Qsci/qsciscintillabase.h 2019-10-04 10:22:26.337474261 +0200 +@@ -27,6 +27,7 @@ + #include <QByteArray> + #include <QPoint> + #include <QTimer> ++#include <QUrl> + + #include <Qsci/qsciglobal.h> + |