Nothin' but Slackware

バイクとLinuxに戯れる日々

2022年04月

cidfmap and xpdfrc for IPA-fonts on slackware

Slackware64-15.0 においてIPAフォントを標準フォントにする場合は、同時に
cidfmap : ( /usr/share/ghostscript/$VERSION/Resource/Init/cidfmap )
xpdfrc : ( /etc/xpdfrc or {HOME]/.xpdfrc )
を IPAフォント用のものに置き換えましょう)

If you use IPA fonts instead of Sazanami fonts as your STD desktop fonts on slackware64-15.0,
you will need to replace cidfmap and xpdfrc to those for IPA fonts.

Fonts URL:

[examples]

cidfmap (for IPA)
[code]
%!
% This is a sample map file for CIDFont category.

%
% The map is a set of records, which must use one of the two formats :
%
% 1. A substutution of a CIDFont font with another CIDFont :
%
%    /substituted /original ;
%
%    Where 'substituted' is a name being used in a document,
%    'original' is a name of an available resource.
%
% 2. A substutution of a CIDFont font with a True Type font :
%
%    /substituted << /FileType /TrueType /Path (path) /SubfontID 1 /CSI [(ordering) supplement] >> ;
%
%    Where 'substituted' is a name being used in a document,
%    'path' is a path to a True Type font file,
%    'ordering' is a value of Ordering required for CIDSystemInfo dictionary,
%    'supplement' is a value of Supplement required for CIDSystemInfo dictionary.
%    'SubfontID' is the index of the desired font in a TTC - ignored if the target is not a TTC.
%
%    The Ordering, and Registry (if present) entries should be PostScript string types
%    ie enclosed in parentheses, not PostScript name type (initial character '/'). See
%    gs/doc/Use.htm#CIDFontSubstitution
%
%    Alternatively:
%    (substituted name) << /FileType /TrueType /Path (path) /SubfontID 1 /CSI [(ordering) supplement] >> ;
%
%    This is where the CIDFont name in the document contains a space character. Using a string instead of a name
%    allows this work - Ghostscript will internally convert the key string with a space to a name.
%
%
% Examples :
%    
%   /ShinGo-Bold   /HeiseiKakuGo-W5 ;
%   /Ryumin-Medium << /FileType /TrueType /Path (H:/AuxFiles/Fonts/BATANG.TTC) /SubfontID 3 /CSI [(Japan1) 2] >> ;
%   /Ryumin-Medium << /FileType /TrueType /Path (windir) getenv not {(c:/windows)}if (/Fonts/BATANG.TTC)concatstrings /SubfontID 3 /CSI [(Japan1) 2] >> ;
%
%   NOTE: getenv returns a boolean to indicate success of or failure, as well as the value on success. In the example, it uses this
%         to include a default value should getenv fail.
%
%  (Century Gothic) << /FileType /TrueType /Path (/usr/share/fonts/truetype/fonts-japanese-gothic.ttf) /CSI [(Identity) 1] >> ;
%
%  Note the use of a string to cope with the name containing a space.
%


%% cidfmap.zh_CN (simplified Chinese ; zh_CN)
%% This font will produce better results than the wqy-zenhei.ttc that we use
%% to get out-of-the-box output.
%% If you install it, uncomment the line below and comment the one below that.
%/BousungEG-Light-GB            << /FileType /TrueType /Path (uming.ttf) /CSI [(GB1) 4] >> ;
/BousungEG-Light-GB             << /FileType /TrueType /Path (wqy-zenhei.ttc) /CSI [(GB1) 4] >> ;
%% This font will produce better results than the wqy-zenhei.ttc that we use
%% to get out-of-the-box output.
%% If you install it, uncomment the line below and comment the one below that.
%/GBZenKai-Medium        << /FileType /TrueType /Path (ukai.ttf) /CSI [(GB1) 4] >> ;
/GBZenKai-Medium        << /FileType /TrueType /Path (wqy-zenhei.ttc) /CSI [(GB1) 4] >> ;
/MSungGBK-Light            << /FileType /TrueType /Path (wqy-zenhei.ttc) /CSI [(GB1) 4] >> ;
/MSung-Light            /MSungGBK-Light ;
/MSung-Medium            /GBZenKai-Medium ;
/MHei-Medium            /BousungEG-Light-GB ;
/MKai-Medium            /GBZenKai-Medium ;
/STSong-Light            /BousungEG-Light-GB ;
/STFangsong-Light        /BousungEG-Light-GB ;
/STHeiti-Regular        /MSungGBK-Light ;
/STKaiti-Regular        /GBZenKai-Medium ;
/Adobe-GB1                      /BousungEG-Light-GB ;

%% cidfmap.zh_TW (traditional Chinese ; zh_TW)
%% To use this example, install the missing uming.ttf and ukai.ttf fonts, and
%% uncomment everything in the block below.  Also, fix the simplified Chinese
%% block as described above for "better output" so that there is no
%% interference (or comment the whole block out).
%/BousungEG-Light-GB        << /FileType /TrueType /Path (uming.ttf) /CSI [(CNS1) 4] >> ;
%/ZenKai-Medium            << /FileType /TrueType /Path (ukai.ttf) /CSI [(CNS1) 4] >> ;
%/ShanHeiSun-Light        << /FileType /TrueType /Path (wqy-zenhei.ttc) /CSI [(CNS1) 4] >> ;
%/STSong-Light            /BousungEG-Light-GB ;
%/STKaiti-Regular        /ZenKai-Medium-GB ;
%/STFangsong-Light        /BousungEG-Light ;
%/STHeiti-Regular        /MHei-Medium ;
%/MSung-Light            /BousungEG-Light-GB ;
%/MSung-Medium            /ZenKai-Medium ;
%/MHei-Medium            /ShanHeiSun-Light ;
%/MKai-Medium            /ZenKai-Medium ;
%/Adobe-CNS1            /BousungEG-Light-GB ;

%% cidfmap.ja
/ipag     << /FileType /TrueType /Path (ipag.ttf)    /SubfontID 0 /CSI [ (Japan1) 5 ] >> ;
/ipagp     << /FileType /TrueType /Path (ipagp.ttf)    /SubfontID 0 /CSI [ (Japan1) 5 ] >> ;
/ipagui     << /FileType /TrueType /Path (ipagui.ttf)    /SubfontID 0 /CSI [ (Japan1) 5 ] >> ;
/ipam     << /FileType /TrueType /Path (ipam.ttf)    /SubfontID 0 /CSI [ (Japan1) 5 ] >> ;
/ipamp     << /FileType /TrueType /Path (ipamp.ttf)    /SubfontID 0 /CSI [ (Japan1) 5 ] >> ;

/Ryumin-Light        /ipam ;
/Ryumin-Medium        /ipam ;
/GothicBBB-Medium    /ipag ;
/ChuGothicBBB-Medium    /GothicBBB-Medium    ;
/ChuGothicBBB-Medium-Mono    /MS-Gothic    ;
/FutoGoB101-Bold    /GothicBBB-Medium    ;
/FutoMinA101-Bold    /Ryumin-Light        ;
/GothicMB101-Bold    /GothicBBB-Medium    ;
/GothicMB101-hea    /GothicBBB-Medium    ;
/GothicMB101-Ult    /GothicBBB-Medium    ;
/ShinGo-Bold        /GothicBBB-Medium    ;
/ShinGo-Medium        /GothicBBB-Medium    ;
/ShinGo-regular        /GothicBBB-Medium    ;
/MS-Gothic        /ipag            ;
/MS-PGothic        /ipagp            ;
/MSPGothic        /ipagp            ;
/MS-UIGothic        /ipagui            ;
/MSMincho        /ipam            ;
/MS-Mincho        /ipam            ;
/MS-PMincho        /ipamp            ;
/MSPMincho        /ipamp            ;
/HeiseiMin-W3        /Ryumin-Light        ;
/HeiseiKakuGo-W5    /GothicBBB-Medium    ;
/Kochi-Mincho        /Ryumin-Light        ;
/Kochi-Gothic        /GothicBBB-Medium    ;
/WadaMin-Regular    /ipam            ;
/WadaMin-RegularH       /ipam                ;
/WadaMin-Bold        /ipam            ;
/WadaGo-Regular        /ipag            ;
/WadaGo-Bold        /ipag            ;
/Adobe-Japan1        /Ryumin-Light        ;
/Adobe-Japan2        /Ryumin-Light        ;

%% cidfmap.ko
%% To enable Korean printing support, install the fonts shown in the example
%% here and uncomment the block below:
%/Baekmuk-Batang        << /FileType /TrueType /Path (batang.ttf) /CSI [(Korea1) 2] >> ;
%/Baekmuk-Batang-Regular    /Baekmuk-Batang ;
%/Baekmuk-Dotum            << /FileType /TrueType /Path (dotum.ttf) /CSI [(Korea1) 2] >> ;
%/Baekmuk-Dotum-Regular        /Baekmuk-Dotum ;
%/Baekmuk-Gulim            << /FileType /TrueType /Path (gulim.ttf) /CSI [(Korea1) 2] >> ;
%/Baekmuk-Gulim-Regular        /Baekmuk-Gulim ;
%/Baekmuk-Headline        << /FileType /TrueType /Path (hline.ttf) /CSI [(Korea1) 2] >> ;
%/Baekmuk-Headline-Regular    /Baekmuk-Headline ;
%/Adobe-Korea1            /Baekmuk-Batang ;

%/BousungEG-Light-GB    << /FileType /TrueType /Path (uming.ttf) /CSI [(GB1) 4] >> ;
%/GBZenKai-Medium    << /FileType /TrueType /Path (ukai.ttf) /CSI [(GB1) 4] >> ;
%/MSungGBK-Light    /BousungEG-Light-GB ;
%/Adobe-GB1        /BousungEG-Light-GB ;

%/ZenKai-Medium        << /FileType /TrueType /Path (ukai.ttf) /CSI [(CNS1) 4] >> ;
%/ShanHeiSun-Light    << /FileType /TrueType /Path (uming.ttf) /CSI [(CNS1) 4] >> ;
%/Adobe-CNS1        /ShanHeiSun-Light ;



xpdfrc (for IPA)
 -- 2022-04-26 に更新された xpdf-4.04 にもそのまま使用可能
    (Also works good for xpdf-4.04)
[code]
#========================================================================
#
# Sample xpdfrc file
#
# The Xpdf tools look for a config file in two places:
# 1. ~/.xpdfrc
# 2. in a system-wide directory, typically /usr/local/etc/xpdfrc
#
# This sample config file demonstrates some of the more common
# configuration options.  Everything here is commented out.  You
# should edit things (especially the file/directory paths, since
# they'll likely be different on your system), and uncomment whichever
# options you want to use.  For complete details on config file syntax
# and available options, please see the xpdfrc(5) man page.
#
# Also, the Xpdf language support packages each include a set of
# options to be added to the xpdfrc file.
#
# http://www.xpdfreader.com/
#
#========================================================================

#----- display fonts

# These map the Base-14 fonts to the Type 1 fonts that ship with
# ghostscript.  You'll almost certainly want to use something like
# this, but you'll need to adjust this to point to wherever
# ghostscript is installed on your system.  (But if the fonts are
# installed in a "standard" location, xpdf will find them
# automatically.)

fontFile Times-Roman        /usr/share/ghostscript/fonts/n021003l.pfb
fontFile Times-Italic        /usr/share/ghostscript/fonts/n021023l.pfb
fontFile Times-Bold        /usr/share/ghostscript/fonts/n021004l.pfb
fontFile Times-BoldItalic    /usr/share/ghostscript/fonts/n021024l.pfb
fontFile Helvetica        /usr/share/ghostscript/fonts/n019003l.pfb
fontFile Helvetica-Oblique    /usr/share/ghostscript/fonts/n019023l.pfb
fontFile Helvetica-Bold        /usr/share/ghostscript/fonts/n019004l.pfb
fontFile Helvetica-BoldOblique    /usr/share/ghostscript/fonts/n019024l.pfb
fontFile Courier        /usr/share/ghostscript/fonts/n022003l.pfb
fontFile Courier-Oblique    /usr/share/ghostscript/fonts/n022023l.pfb
fontFile Courier-Bold        /usr/share/ghostscript/fonts/n022004l.pfb
fontFile Courier-BoldOblique    /usr/share/ghostscript/fonts/n022024l.pfb
fontFile Symbol            /usr/share/ghostscript/fonts/s050000l.pfb
fontFile ZapfDingbats        /usr/share/ghostscript/fonts/d050000l.pfb

# If you need to display PDF files that refer to non-embedded fonts,
# you should add one or more fontDir options to point to the
# directories containing the font files.  Xpdf will only look at .pfa,
# .pfb, .ttf, and .ttc files in those directories (other files will
# simply be ignored).

#fontDir        /usr/local/fonts/bakoma

#----- PostScript output control

# Set the default PostScript paper size -- this can be letter, legal,
# A4, or A3.  You can also specify a paper size as width and height
# (in points).

#psPaperSize        letter

#----- text output control

# Choose a text encoding for copy-and-paste and for pdftotext output.
# The Latin1, ASCII7, and UTF-8 encodings are built into Xpdf.  Other
# encodings are available in the language support packages.

#textEncoding        UTF-8

# Choose the end-of-line convention for multi-line copy-and-past and
# for pdftotext output.  The available options are unix, mac, and dos.

#textEOL        unix

#----- misc settings

# Enable FreeType, and anti-aliased text.

#enableFreeType        yes
#antialias        yes

# Set the command used to run a web browser when a URL hyperlink is
# clicked.

#launchCommand  viewer-script
#----- begin Arabic support package (2011-aug-15)
unicodeMap    ISO-8859-6    /usr/share/xpdf/arabic/ISO-8859-6.unicodeMap
#----- end Arabic support package
#----- begin Chinese Simplified support package (2011-sep-02)
cidToUnicode    Adobe-GB1    /usr/share/xpdf/chinese-simplified/Adobe-GB1.cidToUnicode
unicodeMap    ISO-2022-CN    /usr/share/xpdf/chinese-simplified/ISO-2022-CN.unicodeMap
unicodeMap    EUC-CN        /usr/share/xpdf/chinese-simplified/EUC-CN.unicodeMap
unicodeMap    GBK        /usr/share/xpdf/chinese-simplified/GBK.unicodeMap
cMapDir        Adobe-GB1    /usr/share/xpdf/chinese-simplified/CMap
toUnicodeDir            /usr/share/xpdf/chinese-simplified/CMap
fontFileCC    Adobe-GB1    /usr/share/fonts/TTF/wqy-zenhei.ttc
#----- end Chinese Simplified support package
#----- begin Chinese Traditional support package (2011-sep-02)
cidToUnicode    Adobe-CNS1    /usr/share/xpdf/chinese-traditional/Adobe-CNS1.cidToUnicode
unicodeMap    Big5        /usr/share/xpdf/chinese-traditional/Big5.unicodeMap
unicodeMap    Big5ascii    /usr/share/xpdf/chinese-traditional/Big5ascii.unicodeMap
cMapDir        Adobe-CNS1    /usr/share/xpdf/chinese-traditional/CMap
toUnicodeDir            /usr/share/xpdf/chinese-traditional/CMap
fontFileCC    Adobe-CNS1    /usr/share/fonts/TTF/wqy-zenhei.ttc
#----- end Chinese Traditional support package
#----- begin Cyrillic support package (2011-aug-15)
nameToUnicode            /usr/share/xpdf/cyrillic/Bulgarian.nameToUnicode
unicodeMap    KOI8-R        /usr/share/xpdf/cyrillic/KOI8-R.unicodeMap
#----- end Cyrillic support package
#----- begin Greek support package (2011-aug-15)
nameToUnicode            /usr/share/xpdf/greek/Greek.nameToUnicode
unicodeMap    ISO-8859-7    /usr/share/xpdf/greek/ISO-8859-7.unicodeMap
#----- end Greek support package
#----- begin Hebrew support package (2011-aug-15)
unicodeMap    ISO-8859-8    /usr/share/xpdf/hebrew/ISO-8859-8.unicodeMap
unicodeMap    Windows-1255    /usr/share/xpdf/hebrew/Windows-1255.unicodeMap
#----- end Hebrew support package
#----- begin Japanese support package (2011-sep-02)
cidToUnicode    Adobe-Japan1    /usr/share/xpdf/japanese/Adobe-Japan1.cidToUnicode
unicodeMap    ISO-2022-JP    /usr/share/xpdf/japanese/ISO-2022-JP.unicodeMap
unicodeMap    EUC-JP        /usr/share/xpdf/japanese/EUC-JP.unicodeMap
unicodeMap    Shift-JIS    /usr/share/xpdf/japanese/Shift-JIS.unicodeMap
cMapDir        Adobe-Japan1    /usr/share/xpdf/japanese/CMap
toUnicodeDir            /usr/share/xpdf/japanese/CMap
### use IPAex fonts by default
fontFileCC Adobe-Japan1 /usr/share/fonts/TTF/ipaexm.ttf
### use IPAex fonts (IPAex Gothic) if gothic font is required
fontFileCC ShinGo-Bold     /usr/share/fonts/TTF/ipaexg.ttf
fontFileCC ShinGo-regular  /usr/share/fonts/TTF/ipaexg.ttf
fontFileCC MidashiGo-MB31  /usr/share/fonts/TTF/ipaexg.ttf
fontFileCC FutoGoB101-Bold /usr/share/fonts/TTF/ipaexg.ttf
fontFileCC HeiseiKakuGo-W5 /usr/share/fonts/TTF/ipaexg.ttf
fontFileCC HeiseiKakuGo-W9 /usr/share/fonts/TTF/ipaexg.ttf
fontFileCC HeiseiMaruGo-W4 /usr/share/fonts/TTF/ipaexg.ttf
fontFileCC MS-Gothic       /usr/share/fonts/TTF/ipaexg.ttf
fontFileCC HG-GothicB      /usr/share/fonts/TTF/ipaexg.ttf
fontFileCC Kochi-Gothic    /usr/share/fonts/TTF/ipaexg.ttf
fontFileCC GothicBBB-Medium-H      /usr/share/fonts/TTF/ipaexg.ttf
fontFileCC GothicBBB-Medium        /usr/share/fonts/TTF/ipaexg.ttf
fontFileCC Ryumin-Light-H  /usr/share/fonts/TTF/ipaexm.ttf
fontFileCC Ryumin-Light    /usr/share/fonts/TTF/ipaexm.ttf
#### If you want to use IPA fonts instead of IPAex fonts, use sample settings below
#### use IPA fonts by default
#fontFileCC Adobe-Japan1 /usr/share/fonts/TTF/ipam.ttf
#### use IPA fonts (IPA Gothic) if gothic font is required
#fontFileCC ShinGo-Bold     /usr/share/fonts/TTF/ipag.ttf
#fontFileCC ShinGo-regular  /usr/share/fonts/TTF/ipag.ttf
#fontFileCC MidashiGo-MB31  /usr/share/fonts/TTF/ipag.ttf
#fontFileCC FutoGoB101-Bold /usr/share/fonts/TTF/ipag.ttf
#fontFileCC HeiseiKakuGo-W5 /usr/share/fonts/TTF/ipag.ttf
#fontFileCC HeiseiKakuGo-W9 /usr/share/fonts/TTF/ipag.ttf
#fontFileCC HeiseiMaruGo-W4 /usr/share/fonts/TTF/ipag.ttf
#fontFileCC MS-Gothic       /usr/share/fonts/TTF/ipag.ttf
#fontFileCC HG-GothicB      /usr/share/fonts/TTF/ipag.ttf
#fontFileCC Kochi-Gothic    /usr/share/fonts/TTF/ipag.ttf
#fontFileCC GothicBBB-Medium-H      /usr/share/fonts/TTF/ipag.ttf
#fontFileCC GothicBBB-Medium        /usr/share/fonts/TTF/ipag.ttf
#fontFileCC Ryumin-Light-H  /usr/share/fonts/TTF/ipam.ttf
#fontFileCC Ryumin-Light    /usr/share/fonts/TTF/ipam.ttf
### make default font name to "Ryumin-Light" when converted to PostScript
psResidentFontCC        Adobe-Japan1    H       Ryumin-Light-H ISO-2022-JP
psResidentFontCC        Adobe-Japan1    V       Ryumin-Light-V ISO-2022-JP
#   use "Gothic-BBB-Medium" if gothic font is required
psResidentFont16   MidashiGo-MB31  H       GothicBBB-Medium-H ISO-2022-JP
psResidentFont16   MidashiGo-MB31  V       GothicBBB-Medium-V ISO-2022-JP
psResidentFont16   FutoGoB101-Bold H       GothicBBB-Medium-H ISO-2022-JP
psResidentFont16   FutoGoB101-Bold V       GothicBBB-Medium-V ISO-2022-JP
psResidentFont16   HeiseiKakuGo-W5 H       GothicBBB-Medium-H ISO-2022-JP
psResidentFont16   HeiseiKakuGo-W5 V       GothicBBB-Medium-V ISO-2022-JP
psResidentFont16   HeiseiKakuGo-W9 H       GothicBBB-Medium-H ISO-2022-JP
psResidentFont16   HeiseiKakuGo-W9 V       GothicBBB-Medium-V ISO-2022-JP
psResidentFont16   HeiseiMaruGo-W4 H       GothicBBB-Medium-H ISO-2022-JP
psResidentFont16   HeiseiMaruGo-W4 V       GothicBBB-Medium-V ISO-2022-JP
psResidentFont16   MS-Gothic       H       GothicBBB-Medium-H ISO-2022-JP
psResidentFont16   MS-Gothic       V       GothicBBB-Medium-V ISO-2022-JP
psResidentFont16   HG-GothicB      H       GothicBBB-Medium-H ISO-2022-JP
psResidentFont16   HG-GothicB      V       GothicBBB-Medium-V ISO-2022-JP
psResidentFont16   Kochi-Gothic    H       GothicBBB-Medium-H ISO-2022-JP
psResidentFont16   Kochi-Gothic    V       GothicBBB-Medium-V ISO-2022-JP
#----- end Japanese support package
#----- begin Korean support package (2011-sep-02)
cidToUnicode    Adobe-Korea1    /usr/share/xpdf/korean/Adobe-Korea1.cidToUnicode
cidToUnicode    Adobe-KR    /usr/share/xpdf/korean/Adobe-KR.cidToUnicode
unicodeMap    ISO-2022-KR    /usr/share/xpdf/korean/ISO-2022-KR.unicodeMap
cMapDir        Adobe-Korea1    /usr/share/xpdf/korean/CMap
cMapDir        Adobe-KR    /usr/share/xpdf/korean/CMap
toUnicodeDir            /usr/share/xpdf/korean/CMap
#fontFileCC    Adobe-Korea1    /usr/..../NotoSansCJKkr-Regular.otf
#fontFileCC    Adobe-KR    /usr/..../NotoSansCJKkr-Regular.otf
#----- end Korean support package
#----- begin Latin2 support package (2011-aug-15)
unicodeMap    Latin2    /usr/share/xpdf/latin2/Latin2.unicodeMap
#----- end Latin2 support package
#----- begin Thai support package (2011-aug-15)
nameToUnicode            /usr/share/xpdf/thai/Thai.nameToUnicode
unicodeMap    TIS-620        /usr/share/xpdf/thai/TIS-620.unicodeMap
#----- end Thai support package
#----- begin Turkish support package (2011-aug-15)
unicodeMap    ISO-8859-9    /usr/share/xpdf/turkish/ISO-8859-9.unicodeMap
#----- end Turkish support package

===
2022-04-26
2022-04-28 : Added comment for xpdf-4.04






MEGAsync-4.6.6.0_Linux

MEGAsync (4.6.6.0_Linux).has been released.
https://github.com/meganz/MEGAsync/r...v4.6.6.0_Linux

Package was compiled successfully on slackware64-15.0 and is working fine so far.
src :
MEGAsync-4.6.6.0_Linux.tar.gz
sdk-3.9.16.tar.gz

MEGAsync.SlackBuild
[code]
#!/bin/sh

# Slackware build script for MEGASync input plugin

# Copyright 2017,2018 Felipe Bugno <capent@yahoo.com>
#
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
#
#  THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
#  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
#  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
#  EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
#  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
#  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
#  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
#  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
#  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
#  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# 2021-08-23 : version bump to 4.5.0.0 -- Build with gcc-11 and with ffmpeg4.4 patch
# 2021-08-24 : version bump to 4.5.3.0 -- Build with gcc-11 and with ffmpeg4.4 patch
# 2021-08-24 : version 4.5.3.0 2jw -- use sdk-3.8.2c instead of commit version "c11a688d578e16dc25d4c94fee7995730be1aa50".
# 2021-11-22 : version 4.6.1.0 1jw -- use source 4.6.1.0_Win and sdk-3.9.6a
# 2021-12-15 : version 4.6.2.0 1jw -- use source 4.6.2.0_Linux and sdk-3.9.6a
# 2022-01-30 : version 4.6.3.0 1jw -- version bump to 4.6.3.0 with official 4.6.3.0_Linux source
# 2022-03-07 : version 4.6.3.0-2jw -- rebuild under ibmediainfo-21.0 and libzen-0.4.39
# 2022-03-30 : version 4.6.5.0-1jw -- version bump to 4.6.5.0 Linux
# 2022-04-23 : Version 4.6.6.0-1jw -- version bump to 4.6.6.0_Linux with sdk-3.9.16

PRGNAM=MEGAsync
VERSION=${VERSION:-4.6.6.0}
SDK=${SDK:-3.9.16}
BUILD=${BUILD:-1}
TAG=${TAG:-jw}

if [ -z "$ARCH" ]; then
  case "$( uname -m )" in
    i?86) ARCH=i586 ;;
    arm*) ARCH=arm ;;
       *) ARCH=$( uname -m ) ;;
  esac
fi

CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}

if [ "$ARCH" = "i586" ]; then
  SLKCFLAGS="-O2 -march=i586 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
  SLKCFLAGS="-O2 -march=i686 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O2 -fPIC"
  LIBDIRSUFFIX="64"
else
  SLKCFLAGS="-O2"
  LIBDIRSUFFIX=""
fi

set -e

rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION\_Linux
tar xvf $CWD/$PRGNAM-$VERSION\_Linux.tar.gz
cd $PRGNAM-$VERSION\_Linux/src/MEGASync/mega
tar --strip-components=1 -xvf $CWD/sdk-$SDK.tar.gz
cd ../../../
chown -R root:root .
find -L . \
 \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
  -o -perm 511 \) -exec chmod 755 {} \; -o \
 \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
  -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;

cd src/MEGASync/mega
patch -p1 < $CWD/megasync-4.5.0.0_pdfium.patch

./autogen.sh
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
  --prefix=/usr \
  --datarootdir=/usr \
  --libdir=/usr/lib${LIBDIRSUFFIX} \
  --sysconfdir=/etc \
  --localstatedir=/var \
  --mandir=/usr/man \
  --docdir=/usr/doc/$PRGNAM-$VERSION \
  --build=$ARCH-slackware-linux \
  --with-cares \
  --with-cryptopp \
  --with-curl \
  --with-sodium \
  --with-sqlite \
  --with-zlib \
  --with-termcap \
  --with-freeimage \
  --enable-chat \
  --enable-gcc-hardening

# Apply ffmpeg4 fix patch ; Thanks Gentoo
cd ../../../
patch -p1 < $CWD/megasync-4.6.0.0_ffmpeg.patch

cd src/
#cd ../../../src
qmake CONFIG+="release" QMAKE_CXXFLAGS="$SLKCFLAGS" MEGA.pro
lrelease MEGASync/MEGASync.pro
make
install -m 755 -p -D $TMP/$PRGNAM-$VERSION\_Linux/src/MEGASync/megasync $PKG/usr/bin/megasync
install -m 644 -p -D $TMP/$PRGNAM-$VERSION\_Linux/src/MEGASync/platform/linux/data/megasync.desktop $PKG/usr/share/applications/megasync.desktop
install -m 644 -p -D $TMP/$PRGNAM-$VERSION\_Linux/src/MEGASync/platform/linux/data/icons/hicolor/16x16/apps/mega.png $PKG/usr/share/icons/hicolor/16x16/apps/mega.png
install -m 644 -p -D $TMP/$PRGNAM-$VERSION\_Linux/src/MEGASync/platform/linux/data/icons/hicolor/32x32/apps/mega.png $PKG/usr/share/icons/hicolor/32x32/apps/mega.png
install -m 644 -p -D $TMP/$PRGNAM-$VERSION\_Linux/src/MEGASync/platform/linux/data/icons/hicolor/48x48/apps/mega.png $PKG/usr/share/icons/hicolor/48x48/apps/mega.png
install -m 644 -p -D $TMP/$PRGNAM-$VERSION\_Linux/src/MEGASync/platform/linux/data/icons/hicolor/128x128/apps/mega.png $PKG/usr/share/icons/hicolor/128x128/apps/mega.png
install -m 644 -p -D $TMP/$PRGNAM-$VERSION\_Linux/src/MEGASync/platform/linux/data/icons/hicolor/256x256/apps/mega.png $PKG/usr/share/icons/hicolor/256x256/apps/mega.png

find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
  | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true

mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cd $TMP/$PRGNAM-$VERSION\_Linux
cp -a  README.md LICENCE.md CREDITS.md $PKG/usr/doc/$PRGNAM-$VERSION
cp $CWD/megasync-4.5.0.0_pdfium.patch $CWD/megasync-4.6.0.0_ffmpeg.patch $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild

mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh

cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-txz}

MEGAsync.info
[code]
PRGNAM="MEGAsync"
VERSION="4.6.6.0"
HOMEPAGE="https://github.com/meganz/MEGAsync/"
DOWNLOAD="https://github.com/meganz/MEGAsync/archive/v4.6.6.0_Linux/MEGAsync-4.6.6.0_Linux.tar.gz \
          https://github.com/meganz/sdk/archive/v3.9.16/sdk-3.9.16.tar.gz"
MD5SUM="74bacd4939c5ab1fed67d5174ded02c1 \
        f289d25b841e7d31c2d2b0887b6f8acd"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="FreeImage libmediainfo"
MAINTAINER="Felipe Bugno"
EMAIL="capent@yahoo.com"

megasync-4.5.0.0_pdfium.patch
[code]
diff --git a/bindings/qt/sdk.pri b/bindings/qt/sdk.pri
index 83ddc2e2f..46aa06d33 100644
--- a/bindings/qt/sdk.pri
+++ b/bindings/qt/sdk.pri
@@ -255,6 +255,11 @@ CONFIG(USE_PDFIUM) {
                 DEFINES += HAVE_PDFIUM
                 LIBS += -lpdfium
             }
+            else:exists(/usr/include/pdfium/fpdfview.h) {
+                DEFINES += HAVE_PDFIUM
+                INCLUDEPATH += /usr/include/pdfium
+                LIBS += -lpdfium
+            }
         }
         else {#win/mac
             DEFINES += HAVE_PDFIUM


megasync-4.6.0.0_ffmpeg.patch
[code]
diff -Naur a/src/MEGASync/mega/src/gfx/freeimage.cpp b/src/MEGASync/mega/src/gfx/freeimage.cpp
--- a/src/MEGASync/mega/src/gfx/freeimage.cpp    2021-05-23 02:28:08.694081111 +0100
+++ b/src/MEGASync/mega/src/gfx/freeimage.cpp    2021-05-23 02:29:56.189964969 +0100
@@ -188,7 +188,7 @@
 
     // Force seeking to key frames
     formatContext->seek2any = false;
-    videoStream->skip_to_keyframe = true;
+    //videoStream->skip_to_keyframe = true;
     if (decoder->capabilities & CAP_TRUNCATED)
     {
         codecContext.flags |= CAP_TRUNCATED;


slack-desc
[code]
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.
# Line up the first '|' above the ':' following the base package name, and
# the '|' on the right side marks the last column you can put a character in.
# You must make exactly 11 lines for the formatting to be correct.  It's also
# customary to leave one space after the ':' except on otherwise blank lines.

        |-----handy-ruler------------------------------------------------------|
MEGAsync: MEGAsync (mega cloud storage service)
MEGAsync:
MEGAsync: MEGAsync open source release for MEGA cloud storage services
MEGAsync:
MEGAsync:
MEGAsync: Compiled using default Slackware Qt4.
MEGAsync:
MEGAsync: Homepage: https://github.com/meganz/MEGAsync
MEGAsync: Service: https://mega.nz/
MEGAsync:
MEGAsync:

do-inst.sh
[code]
if [ -x /usr/bin/update-desktop-database ]; then
  /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
fi

if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
  if [ -x /usr/bin/gtk-update-icon-cache ]; then
    /usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1
  fi
fi

---


With Ukraine ... ウクライナと共に


Ukraine Crisis Relief Fund
Ukraine_Crisis_Relief_Fund
※ 目標金額までもう少しです


ウクライナ避難者のい皆さんへの支援
ウクライナ避難者の日本受け入れをご支援ください。
※ ウクライナから日本は遠く、避難者のみなさんにとって渡航費用が高いハードルです


HURU (ウクライナのバッグ、リュックメーカー)

HURU
※ ウクライナのメーカーです。商品を購入することでも支援になります

-------

山形県天童市の根付駒(ウクライナ支援)

・「平和」: ホリコシ https://www.shogi-horikoshi.com/
・「左馬」: 中島清吉商店 https://www.shogi-koma.com/

将棋の街・天童らしい取り組みです。
Tendo-NetsukeGoma_ウクライナ支援s



ギャラリー
  • deepl-clip.sh で簡単翻訳 [更新:2025-04-29]
  • Avidemux 2.8.2_20250323_7cf15b3
  • Avidemux 2.8.2_20250323_7cf15b3
  • Avidemux 2.8.x with Qt6 GUI
  • Avidemux 2.8.x with Qt6 GUI
  • MEGAcmd-2.0.0_Linux
  • gcolor3 with Japanese menu and LC_MESSAGES
  • avidemux2 TEST package from the latest git source (on jul.23.2024)
  • fcitx5-mozc-2.29.5135.102.1 (15jw) -- Added "merge-ut-dictionaries"