Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
executable file 185 lines (160 sloc) 9.17 KB
#! /bin/sh
# https://github.com/eteran/nedit-ng
PKG=nedit-ng
VERSION=2020.1.75800b6bd
BUILD=0
set -e
umask 022
PATH=/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/package/bin
PREFIX=/pkg/$PKG-$VERSION-$BUILD
if [ -n "$TESTING" ]; then PREFIX=/scratch/local2/$PKG-$VERSION-$BUILD ; fi
mkdir -p $PREFIX
cat >$PREFIX/profile <<-EOF
PATH=$PREFIX/bin:\$PATH
if [ -d $PREFIX/.compatlibs ]; then export LD_LIBRARY_PATH=$PREFIX/.compatlibs\${LD_LIBRARY_PATH:+:\$LD_LIBRARY_PATH} ; fi
EOF
source $PREFIX/profile
BUILD_TMPDIR=/scratch/local2/$PKG-$VERSION-$BUILD.$USER.build.tmp
test -d $BUILD_TMPDIR && ( chmod -R u+rwx $BUILD_TMPDIR || true ; rm -rf $BUILD_TMPDIR )
mkdir -p $BUILD_TMPDIR/home
# copy this script to a defined location
cp $0 $BUILD_TMPDIR; ME="$BUILD_TMPDIR/$(basename $0)"
export TMPDIR=$BUILD_TMPDIR
export HOME=$BUILD_TMPDIR/home
mkdir -p $PREFIX/build
cd $PREFIX/build
# install mkdocs to generate html docs later on, PATH will be taken care of ...
export PYTONUSERBASE=$HOME
pip install --no-warn-script-location mkdocs
# created from https://github.com/eteran/nedit-ng with:
# git archive --format=tar.gz --prefix=nedit-ng-2020.1.75800b6bd/ 75800b6bd -o ../nedit-ng-2020.1.75800b6bd.tar.gz
BEEHIVE=https://beehive.molgen.mpg.de/4b9f3c57a1e4bc588969c46a0e2bc194/nedit-ng-2020.1.75800b6bd.tar.gz
test -e nedit-ng-$VERSION.tar.gz || wget --no-verbose $BEEHIVE
test -d nedit-ng-$VERSION || tar -xf nedit-ng-$VERSION.tar.gz
cd nedit-ng-2020.1.75800b6bd
# Some customisation
# Rationale:
# a) I like it
# b) New users might find the way to set prefs a bit 'strange' at the beginning
# enable linenumbers, searchbar, status per default
sed -ne '/^#Epatch:prefs/ s/^#Epatch:\S* // p' $ME | patch -p0 --verbose
# use existing filename in 'save as ...' dialog
sed -ne '/^#Epatch:setfile/ s/^#Epatch:\S* // p' $ME | patch -p0 --verbose
# make html docs local ...
sed -ne '/^#Epatch:docs/ s/^#Epatch:\S* // p' $ME | patch -p0 --verbose
# ... and set the prefix for the file URL
sed -ie "/PREFIX/ s,%PREFIX%,$PREFIX," src/Help.cpp
mkdir build
cd build
cmake \
-DCMAKE_INSTALL_PREFIX=$PREFIX \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_VERBOSE_MAKEFILE=ON \
..
make -j $(( $(nproc) * 4 / 5 + 1 ))
make install
cd ../docs
PATH=$HOME/.local/bin:$PATH
mkdocs build
mkdir -p $PREFIX/share/doc/nedit-ng/2020.1
cp -ax site/* $PREFIX/share/doc/nedit-ng/2020.1
exit 0
#Epatch:setfile --- src/MainWindow.cpp
#Epatch:setfile +++ src/MainWindow.cpp
#Epatch:setfile @@ -5010,6 +5010,10 @@ QString MainWindow::promptForNewFile(DocumentWidget *document, FileFormats *form
#Epatch:setfile dialog.setFileMode(QFileDialog::AnyFile);
#Epatch:setfile dialog.setAcceptMode(QFileDialog::AcceptSave);
#Epatch:setfile dialog.setDirectory(document->path());
#Epatch:setfile + /* preset with filename, like nedit does (:tk:) */
#Epatch:setfile + if (! document->filename().isEmpty()) {
#Epatch:setfile + dialog.selectFile(document->filename());
#Epatch:setfile + }
#Epatch:setfile dialog.setOptions(QFileDialog::DontUseNativeDialog | QFileDialog::DontUseCustomDirectoryIcons);
#Epatch:setfile dialog.setFilter(QDir::AllDirs | QDir::AllEntries | QDir::Hidden | QDir::System);
#Epatch:prefs --- Settings/Settings.cpp 2024-03-14 06:00:15.000000000 +0100
#Epatch:prefs +++ Settings/Settings.cpp.dist 2024-03-26 09:44:36.182605028 +0100
#Epatch:prefs @@ -294,3 +294,3 @@
#Epatch:prefs wrapMargin = settings.value(tr("nedit.wrapMargin"), 0).toInt();
#Epatch:prefs - autoSave = settings.value(tr("nedit.autoSave"), true).toBool();
#Epatch:prefs + autoSave = settings.value(tr("nedit.autoSave"), false).toBool();
#Epatch:prefs openInTab = settings.value(tr("nedit.openInTab"), true).toBool();
#Epatch:prefs @@ -311,4 +311,4 @@
#Epatch:prefs sortOpenPrevMenu = settings.value(tr("nedit.sortOpenPrevMenu"), true).toBool();
#Epatch:prefs - statisticsLine = settings.value(tr("nedit.statisticsLine"), false).toBool();
#Epatch:prefs - iSearchLine = settings.value(tr("nedit.iSearchLine"), false).toBool();
#Epatch:prefs + statisticsLine = settings.value(tr("nedit.statisticsLine"), true).toBool();
#Epatch:prefs + iSearchLine = settings.value(tr("nedit.iSearchLine"), true).toBool();
#Epatch:prefs sortTabs = settings.value(tr("nedit.sortTabs"), false).toBool();
#Epatch:prefs @@ -318,3 +318,3 @@
#Epatch:prefs globalTabNavigate = settings.value(tr("nedit.globalTabNavigate"), false).toBool();
#Epatch:prefs - lineNumbers = settings.value(tr("nedit.lineNumbers"), false).toBool();
#Epatch:prefs + lineNumbers = settings.value(tr("nedit.lineNumbers"), true).toBool();
#Epatch:prefs pathInWindowsMenu = settings.value(tr("nedit.pathInWindowsMenu"), true).toBool();
#Epatch:prefs @@ -328,5 +328,5 @@
#Epatch:prefs textCols = settings.value(tr("nedit.textCols"), 80).toInt();
#Epatch:prefs - tabDistance = settings.value(tr("nedit.tabDistance"), 8).toInt();
#Epatch:prefs + tabDistance = settings.value(tr("nedit.tabDistance"), 2).toInt();
#Epatch:prefs emulateTabs = settings.value(tr("nedit.emulateTabs"), 0).toInt();
#Epatch:prefs - insertTabs = settings.value(tr("nedit.insertTabs"), true).toBool();
#Epatch:prefs + insertTabs = settings.value(tr("nedit.insertTabs"), false).toBool();
#Epatch:prefs fontName = settings.value(tr("nedit.textFont"), defaultTextFont()).toString();
#Epatch:prefs --- src/res/DefaultStyles.xml 2024-03-26 09:58:34.926484373 +0100
#Epatch:prefs +++ src/res/DefaultStyles.xml.dist 2024-03-14 06:00:15.000000000 +0100
#Epatch:prefs @@ -3,9 +3,9 @@
#Epatch:prefs
#Epatch:prefs <!-- core colors -->
#Epatch:prefs - <text foreground="#221f1e" background="white"/>
#Epatch:prefs - <selection foreground="#ffffff" background="#43ace8"/>
#Epatch:prefs - <highlight foreground="white" background="blue"/>
#Epatch:prefs - <cursor foreground="black"/>
#Epatch:prefs - <line-numbers foreground="#888888" background="#232323"/>
#Epatch:prefs + <text foreground="#101010" background="#ffffff"/>
#Epatch:prefs + <selection foreground="#000000" background="#d0d0d0"/>
#Epatch:prefs + <highlight foreground="#ffffff" background="#ff0000"/>
#Epatch:prefs + <cursor foreground="#000000"/>
#Epatch:prefs + <line-numbers foreground="#303030" background="#f7f7f7"/>
#Epatch:prefs
#Epatch:prefs <!-- syntax highlighting colors -->
#Epatch:docs --- docs/mkdocs.yml.dist 2024-03-14 06:00:15.000000000 +0100
#Epatch:docs +++ docs/mkdocs.yml 2024-03-26 12:12:56.530304972 +0100
#Epatch:docs @@ -1,6 +1,9 @@
#Epatch:docs site_name: NEdit-ng Docs
#Epatch:docs -theme: readthedocs
#Epatch:docs repo_url: https://github.com/eteran/nedit-ng
#Epatch:docs -edit_uri: https://github.com/eteran/nedit-ng/blob/master/docs/docs/
#Epatch:docs +edit_uri: ""
#Epatch:docs +site_url: ""
#Epatch:docs +use_directory_urls: false
#Epatch:docs +plugins: []
#Epatch:docs +theme: readthedocs
#Epatch:docs extra_css:
#Epatch:docs - css/extra.css
#Epatch:docs --- src/Help.cpp.dist 2024-03-14 06:00:15.000000000 +0100
#Epatch:docs +++ src/Help.cpp 2024-03-26 12:45:46.973816117 +0100
#Epatch:docs @@ -17,20 +17,20 @@
#Epatch:docs switch (topic) {
#Epatch:docs case Help::Topic::Start:
#Epatch:docs - url = QStringLiteral("https://eteran.github.io/nedit-ng/%1.%2/").arg(NEDIT_VERSION_MAJ).arg(NEDIT_VERSION_REV);
#Epatch:docs + url = QStringLiteral("file://%PREFIX%/share/doc/nedit-ng/%1.%2/index.html").arg(NEDIT_VERSION_MAJ).arg(NEDIT_VERSION_REV);
#Epatch:docs break;
#Epatch:docs case Help::Topic::SmartIndent:
#Epatch:docs - url = QStringLiteral("https://eteran.github.io/nedit-ng/%1.%2/12").arg(NEDIT_VERSION_MAJ).arg(NEDIT_VERSION_REV);
#Epatch:docs + url = QStringLiteral("file://%PREFIX%/share/doc/nedit-ng/%1.%2/12.html").arg(NEDIT_VERSION_MAJ).arg(NEDIT_VERSION_REV);
#Epatch:docs break;
#Epatch:docs case Help::Topic::Syntax:
#Epatch:docs - url = QStringLiteral("https://eteran.github.io/nedit-ng/%1.%2/13").arg(NEDIT_VERSION_MAJ).arg(NEDIT_VERSION_REV);
#Epatch:docs + url = QStringLiteral("file://%PREFIX%/share/doc/nedit-ng/%1.%2/13.html").arg(NEDIT_VERSION_MAJ).arg(NEDIT_VERSION_REV);
#Epatch:docs break;
#Epatch:docs case Help::Topic::TabsDialog:
#Epatch:docs - url = QStringLiteral("https://eteran.github.io/nedit-ng/%1.%2/41").arg(NEDIT_VERSION_MAJ).arg(NEDIT_VERSION_REV);
#Epatch:docs + url = QStringLiteral("file://%PREFIX%/share/doc/nedit-ng/%1.%2/41.html").arg(NEDIT_VERSION_MAJ).arg(NEDIT_VERSION_REV);
#Epatch:docs break;
#Epatch:docs case Help::Topic::CustomTitleDialog:
#Epatch:docs - url = QStringLiteral("https://eteran.github.io/nedit-ng/%1.%2/42").arg(NEDIT_VERSION_MAJ).arg(NEDIT_VERSION_REV);
#Epatch:docs + url = QStringLiteral("file://%PREFIX%/share/doc/nedit-ng/%1.%2/42.html").arg(NEDIT_VERSION_MAJ).arg(NEDIT_VERSION_REV);
#Epatch:docs break;
#Epatch:docs default:
#Epatch:docs - url = QStringLiteral("https://eteran.github.io/nedit-ng/%1.%2/").arg(NEDIT_VERSION_MAJ).arg(NEDIT_VERSION_REV);
#Epatch:docs + url = QStringLiteral("file://%PREFIX%/share/doc/nedit-ng/%1.%2/index.html").arg(NEDIT_VERSION_MAJ).arg(NEDIT_VERSION_REV);
#Epatch:docs break;
#Epatch:docs }