# goldendict/cfg - "Build" settings for package #--------------------------------------------------------------------- [technotes] 1. The source tarball used by this package was created based on "git" upstream sources. The sources were obtained as follows: ocgitfetch --run goldendict \ https://github.com/xiaoyifang/goldendict-ng.git #--------------------------------------------------------------------- 2. This package is based on "GoldenDict-NG" as opposed to the original "GoldenDict". #--------------------------------------------------------------------- 3. GoldenDict-NG requires that the program be run as a non-root user. As a work-around, if the user is "root", Laclin's version of the pack- age runs the program as "guest". #--------------------------------------------------------------------- 4. Configuration changes: * Optional but recommended: Disable horizontal dictionary list: View -> Dictionary bar [off] The reason to do this is that the list may not fit well into the hori- zontal space available. The vertical list remains regardless and works better. * Network-related changes: Edit -> Preferences -> Network -> Disallow loading content [on] -> Do not identify GoldenDict [on] -> Check for new program releases [off] * Set zoom level as desired: Ctrl Plus * Set display style as desired: Edit -> Preferences -> Interface -> Display style -> Default * Set window and panel dimensions as desired * Add morphology and enable: Edit -> Dictionaries -> morphology -> change /glibc64/pkg/goldendict/data Choose Enabled Apply, OK Note: The "glibc64" setting used here may work even if the distro is booted in 32-bit mode. * Run the program as root and add data as source: Edit -> Dictionaries -> sources -> files -> Add same directory -> Choose Rescan now This will start full-text indexing * Use system tray: Edit -> Preferences -> Interface -> Start to system tray [on] -> Close to system tray [on] * Don't search in dictionaries containing more than 1000000 articles: Edit -> Preferences -> Full-text search -> Don't search in ... [1000000] * Disable external sources: Edit -> Sources -> Wikipedia -> Disable all Edit -> Sources -> DICT servers -> Disable all Edit -> Sources -> Lingua Libre -> Disable all On the Sources -> Websites tab, external websites should be disabled in the "Enabled" column but can be enabled in the "As link" column. * Let things reindex * Clear history * Exit * Subsequent to reindexing of the default dictionaries, the sysadmin may wish to move the dictionaries and indexes to a permanent system location. This will permit multiple users to use the files. This can be done as follows: (a) Exit GoldenDict[-NG] (b) Ensure that the program is terminated (c) sudo mv -i $HOME/.cache/goldendict/index/* \ /static/goldendict/index/ Note: The Laclin wrapper for the program will automatically symlink the files back to the location that the program expects. * It may be advisable to make the system copies of the index directory and index files immutable until you need to make changes. This can be done as follows: sudo chattr -R +i /static/goldendict/index/ #--------------------------------------------------------------------- 5. This package uses, at runtime, external data directories located at: /static/goldendict # Dictionary files /static/goldendict/index # Dictionary index files These directories hold a default set of goldendict dictionaries. The default set is provided to users. Users can't update or otherwise modify the default dictionaries from within goldendict. They can remove them from their setups with a few manual steps. The default set should be prepared correctly before this package is used by ordinary users. The preparation process requires manual steps and takes a while. However, it only needs to be done once, initially. If certain things change , it may need to be redone. For example, these events may necessitate a rebuild of the default set: * Build of a new release of goldendict * Build of goldendict for a different architecture * Update of existing dictionary files It's possible to add or remove dictionary files from/to the default set without going through the full preparation procedure. Users can, additionally, add or remove dictionary files of their own, though they can't modify the system set. #--------------------------------------------------------------------- [buildtimes] 00.02 hours (or 000.95 minutes) - Dell Inspiron 6400 2.0 GHz Intel Duo 7200 2GB RAM 00.05 hours (or 002.75 minutes) - HP EliteBook 8560w 32GB RAM 00.09 hours (or 005.20 minutes) - ThinkPad E540 i7 4x2 16GB RAM 00.12 hours (or 006.90 minutes) - ThinkPad W530 i7 4x2 32GB RAM with a 64-bit kernel and 32-bit distro #--------------------------------------------------------------------- [settings] altpkg = yes defer = glibc64 exepack = no strip = no license = See "license*.txt" in installed tree licfile = LICENSE.txt tmpsize = 13M dontfind = ffmpeg2 ffmpeg3 ffmpeg4 ffmpeg5 qt4 qt5 setpaths = \ bzip2 ffmpeg6 hunspell libeb16 libicu \ liblzo2 libvorbis libzim opencc qt6 \ xapian xorg xzutils zlib zstd #--------------------------------------------------------------------- [depends] alsa brotli bzip2 cairo cmake dav1d double-conversion eudev expat ffmpeg6 flac fontconfig freetype2 fribidi git gnutls3 graphite2 gtkcore hunspell jpeg lame lcms2 libaom libb2 libbluray libbsd libcroco libeb16 libevent2 libffi libgcrypt libgmp libgpg-error libgsm libicu libidn2 liblzo2 libogg libpng librtmp libsndfile libsoxr libssh libunistring libva libvorbis libvpx114 libwebp libxml2 libxslt libzim minizip-ng ncurses nettle3 nspr nss numactl opencc openjpeg24 openssl openssl3 opus p11kit pciutils pcre2 pkgconf pulseaudio qt6 speex sqlite3 theora tiff twolame util-linux x264 x265 xapian xorg xvidcore xzutils zlib zstd #--------------------------------------------------------------------- [configure] VARDIR=/var/goldendict mkdir -p $VARDIR/index export QTDIR=$PRODTREE/qt6 export QT6DIR=$QTDIR cp -p $PKGDIR_SPECIAL/goldendict.png icons/programicon.png #echo pwd: `pwd` #ls -l #qmake \ # "PREFIX=$PKGDIR_PROD" "CONFIG+=zim_support" "CONFIG+=debug" \ # goldendict.pro mkdir obj && cd obj cmake \ -DCMAKE_BUILD_TYPE=RELEASE \ -DCMAKE_INSTALL_PREFIX=$PKGDIR_PROD \ -DCMAKE_INSTALL_LIBDIR=lib \ .. #--------------------------------------------------------------------- [build] cd obj && smpmake && make install #--------------------------------------------------------------------- [postbuild] BINDIR=$PKGDIR_PROD/bin DATADIR=$PKGDIR_PROD/data mkdir -p $BINDIR $DATADIR mkdir -p /static/goldendict/index touch /static/goldendict/index/placeholder.txt || true sed -e "s|__META_PREFIX__|$PKGDIR_PROD|g" \ < $PKGDIR_SPECIAL/config.in \ > $DATADIR/config cd $BINDIR mkdir ../xbin/ mv goldendict ../xbin/goldendict cp -p $PKGDIR_SPECIAL/goldendict.wrapper.in goldendict sed -e "s|__META_PREFIX__|$PKGDIR_PROD|g" \ < $PKGDIR_SPECIAL/goldendict.middle \ > ../xbin/goldendict.middle sed -e "s|__META_PREFIX__|$PKGDIR_PROD|g" \ < $PKGDIR_SPECIAL/goldendict.wrapper.in \ > goldendict chmod 755 goldendict ../xbin/goldendict.middle cd $DATADIR unzip -o $PKGDIR_SPECIAL/morphology/en_US_1.0.zip cp -p $PKGDIR_SPECIAL/goldendict.png . #--------------------------------------------------------------------- # Original URLs. These URLs were valid at one point, but may have died # since then. If you download newer versions of tarballs [etc.], don't # delete the original versions, as you may not be able to replace # them. [urls] url_debian = tbd url_home = tbd url_lfs = tbd url_tarball = git # See "technotes" in "cfg" file #--------------------------------------------------------------------- [history] 170916 Added package. Started with 170916 ("git" date). 180317 Updated to 180317 180514 Updated to 180514 181117 Updated to 0d9a12a7e ("git" hash) 190226 Updated to e7e37cbbe 190426 Updated to c3ff15f4d 190908 Updated to c53fe1c64 210316 Updated to b2e673961 210915 Updated to baff02a14 220104 Updated to 0e888db87 220620 Updated to 39abe4f1a 230418 Updated to 8834e4a29 230709 Updated to a2be17974 230723 Switched to GoldenDict-NG 240723 Updated to cd5805969 241026 Updated to 15207cf40