diff --git a/Apps/amarok/amarok.SlackBuild b/Apps/amarok/amarok.SlackBuild index b94cf9f..d404583 100755 --- a/Apps/amarok/amarok.SlackBuild +++ b/Apps/amarok/amarok.SlackBuild @@ -56,8 +56,8 @@ chown_fn cd_builddir_fn -# If mp4v2 is installed, use mp4 metadata sources in build, otherwise use m4a .. -[[ -s /usr/include/mp4v2/mp4v2.h ]] && MP4V2="ON" || sed -i 's|tagmp4-static|tagm4a-static|' ../amarok/src/metadata/CMakeLists.txt +# If mp4v2 is installed, use mp4 metadata sources in build, otherwise m4a is used .. +[[ -s /usr/include/mp4v2/mp4v2.h ]] && MP4V2="ON" ## Build xine-engine? [[ -s /usr/include/xine.h ]] && XINE="ON" diff --git a/Apps/k3b/k3b.SlackBuild b/Apps/k3b/k3b.SlackBuild index a75308b..9ee5220 100755 --- a/Apps/k3b/k3b.SlackBuild +++ b/Apps/k3b/k3b.SlackBuild @@ -56,6 +56,8 @@ cd libmpcdec-1.2.6/ CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ +CC=$COMPILER \ +CXX=$COMPILER_CXX \ ./configure --libdir=\${exec_prefix}/lib${LIBDIRSUFFIX} --disable-static make @@ -137,8 +139,20 @@ echo $'--- lib/sigclient.cpp ## work-around for gcc11+ - see https://gcc.gnu.org/gcc-11/porting_to.html [[ $(gcc --version) == *1[1-9]* ]] && CXXFLAGS_="-std=gnu++14" + +## clang build +## comhttpsocket.cpp:25:44: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal] +## const char* g_strCOMVer = "libmusicbrainz/"VERSION; +## ^ +[[ $COMPILER_CXX == clang++ ]] && { +sed -i 's|"VERSION|" VERSION|' lib/comhttpsocket.cpp +sed -i 's|"VERSION|" VERSION|' lib/musicbrainz.cpp +} + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS ${CXXFLAGS_:-}" \ +CC=$COMPILER \ +CXX=$COMPILER_CXX \ ./configure --libdir=\${exec_prefix}/lib${LIBDIRSUFFIX} --disable-static make @@ -159,6 +173,162 @@ MUSICBRAINZ="ON" untar_fn +## Re: commit 1f4a3ab +## Make s_codecFeatures a "const char *" to remove ISO C++ warning +patch -N -p0 << EOF || true +--- libk3b/jobs/k3bvideodvdtitletranscodingjob.cpp ++++ libk3b/jobs/k3bvideodvdtitletranscodingjob.cpp +@@ -564,1 +564,1 @@ +- static char* s_codecFeatures[] = { "xvid", "ffmpeg" }; ++ static const char* s_codecFeatures[] = { "xvid", "ffmpeg" }; +@@ -575,1 +575,1 @@ +- static char* s_codecFeatures[] = { "lame", "ac3", "ac3" }; ++ static const char* s_codecFeatures[] = { "lame", "ac3", "ac3" }; +EOF + +## Re: 14.0.x, commits fad8c63 & ea1dbe7 +## Enable ffmpeg 5.0 compatibility +patch -N -p0 << EOF || true +--- plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp ++++ plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp +@@ -36,4 +36,2 @@ + +-#define FFMPEG_CODEC(s) (s->codec) +- + #if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(52, 101, 0) +@@ -105,3 +103,7 @@ ++ ::AVCodecContext *audio_stream_ctx; + ::AVSampleFormat sampleFormat; + ::AVFrame *frame; +- ::AVPacket packet; ++ ::AVPacket *packet; ++#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(57, 12, 100) ++ ::AVPacket _packet; ++#endif +@@ -120,2 +122,4 @@ ++ d->audio_stream_ctx = NULL; + d->frame = av_frame_alloc(); + d->outputBufferPos = NULL; ++ d->packet = NULL; +@@ -161,16 +165,37 @@ +- ::AVCodecContext *codecContext = FFMPEG_CODEC(d->audio_stream); +- if (codecContext->codec_type != AVMEDIA_TYPE_AUDIO) { ++#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(57, 33, 100) ++ if (d->audio_stream->codecpar->codec_type != AVMEDIA_TYPE_AUDIO) ++#else ++ d->audio_stream_ctx = d->audio_stream->codec; ++ if (d->audio_stream_ctx->codec_type != AVMEDIA_TYPE_AUDIO) ++#endif ++ { + kdDebug() << "(K3bFFMpegFile) not a simple audio stream: " << m_filename; + return false; + } + + // get the codec +- d->codec = ::avcodec_find_decoder(codecContext->codec_id); ++#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(57, 33, 100) ++ d->codec = (AVCodec *)::avcodec_find_decoder(d->audio_stream->codecpar->codec_id); ++#else ++ d->codec = (AVCodec *)::avcodec_find_decoder(d->audio_stream_ctx->codec_id); ++#endif + if (!d->codec) { + kdDebug() << "(K3bFFMpegFile) no codec found for " << m_filename; + return false; + } + ++#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(57, 33, 100) ++ // allocate a codec context ++ d->audio_stream_ctx = avcodec_alloc_context3(d->codec); ++ if (d->audio_stream_ctx) { ++ avcodec_parameters_to_context(d->audio_stream_ctx, d->audio_stream->codecpar); ++ } ++ else { ++ kdDebug() << "(K3bFFMpegFile) failed to allocate a codec context for " ++ << m_filename; ++ } ++#endif ++ + // open the codec on our context +- kdDebug() << "(K3bFFMpegFile) found codec for " << m_filename; +- if (::avcodec_open2(codecContext, d->codec, NULL) < 0) { ++ kdDebug() << "(K3bFFMpegFile) found codec for " << m_filename << endl; ++ if (::avcodec_open2(d->audio_stream_ctx, d->codec, NULL) < 0) { +@@ -210,2 +235,6 @@ +- ::avcodec_close(FFMPEG_CODEC(d->audio_stream)); ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55, 63, 100) ++ ::avcodec_free_context(&d->audio_stream_ctx); ++#else ++ ::avcodec_close(d->audio_stream_ctx); + d->codec = NULL; ++#endif +@@ -304,7 +333,12 @@ +- ::av_init_packet(&d->packet); ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 12, 100) ++ d->packet = ::av_packet_alloc(); ++#else ++ ::av_init_packet(&d->_packet); ++ d->packet = &d->_packet; ++#endif + +- if (::av_read_frame(d->formatContext, &d->packet) < 0) { ++ if (::av_read_frame(d->formatContext, d->packet) < 0) { + return 0; + } +- d->packetSize = d->packet.size; +- d->packetData = d->packet.data; ++ d->packetSize = d->packet->size; ++ d->packetData = d->packet->data; +@@ -327,10 +361,37 @@ +- int len = ::avcodec_decode_audio4(FFMPEG_CODEC(d->audio_stream), d->frame, +- &gotFrame, &d->packet); ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 12, 100) ++ int len = avcodec_receive_frame(d->audio_stream_ctx, d->frame); ++ if (len == 0) { ++ gotFrame = 1; ++ } ++ else if (len == AVERROR(EAGAIN)) { ++ len = 0; ++ } ++ ++ if (len == 0) { ++ len = avcodec_send_packet(d->audio_stream_ctx, d->packet); ++ if (len == AVERROR(EAGAIN)) { ++ len = 0; ++ } ++ } ++#else ++ int len = ::avcodec_decode_audio4(d->audio_stream_ctx, d->frame, ++ &gotFrame, d->packet); ++#endif + +- if (d->packetSize <= 0 || len < 0) +- ::av_packet_unref(&d->packet); ++ if (d->packetSize <= 0 || len < 0) { ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 12, 100) ++ ::av_packet_free(&d->packet); ++#else ++ ::av_packet_unref(d->packet); ++ d->packet = NULL; ++#endif ++ } + if (len < 0) { + kdDebug() << "(K3bFFMpegFile) decoding failed for " << m_filename; + return -1; + } + ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 12, 100) ++ len = d->packet->size; ++#endif ++ +@@ -389,1 +450,5 @@ +-K3bFFMpegWrapper::K3bFFMpegWrapper() { ::av_register_all(); } ++K3bFFMpegWrapper::K3bFFMpegWrapper() { ++#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(58,9,100) ++ ::av_register_all(); ++#endif ++} +EOF + ## using cmake common rules find doc -name CMakeLists.txt | xargs rm diff --git a/Apps/k9copy/k9copy.SlackBuild b/Apps/k9copy/k9copy.SlackBuild index 4cc3d20..516556c 100755 --- a/Apps/k9copy/k9copy.SlackBuild +++ b/Apps/k9copy/k9copy.SlackBuild @@ -33,6 +33,10 @@ getsource_fn untar_fn +## clang build +## .../k9vamps/cputest.cpp:26:18: error: invalid suffix on literal; C++11 requires a space between literal and identifier +sed -i 's|%%"REG_b|%%" REG_b|;s|%%"REG_S|%%" REG_S|' k9vamps/cputest.cpp + # set support for additional language(s) as per I18N variable # but only for languages available with this package langs="";for Lang in $I18N;do [[ -e po/$Lang".po" ]] && langs="$langs $Lang"".po";done diff --git a/Apps/kdbg/kdbg.SlackBuild b/Apps/kdbg/kdbg.SlackBuild index 4f52ce1..657c071 100755 --- a/Apps/kdbg/kdbg.SlackBuild +++ b/Apps/kdbg/kdbg.SlackBuild @@ -33,6 +33,64 @@ getsource_fn untar_fn +## for clang, commit 2fa7734 +patch -p0 -N << EOF || true +--- kdbg/dbgdriver.cpp ++++ kdbg/dbgdriver.cpp +@@ -133,2 +133 @@ +- TRACE(TQString().sprintf("interrupted the command %d", +- (m_activeCmd ? m_activeCmd->m_cmd : -1))); ++ TRACE(TQString("interrupted the command %1").arg((m_activeCmd ? m_activeCmd->m_cmd : -1))); +--- kdbg/debugger.cpp ++++ kdbg/debugger.cpp +@@ -2178,2 +2178 @@ +- TRACE(TQString().sprintf("Changing %s to ", +- wnd->name()) + text); ++ TRACE(TQString("Changing %1 to ").arg(wnd->name()) + text); +--- kdbg/gdbdriver.cpp ++++ kdbg/gdbdriver.cpp +@@ -905 +905 @@ +- TRACE(TQString().sprintf("parse error: = not found after %s", name)); ++ TRACE(TQString("parse error: = not found after %1").arg(name)); +@@ -944 +944 @@ +- TRACE(TQString().sprintf("parse error: mismatching %c%c at %-20.20s", opening, closing, s)); ++ TRACE(TQString("parse error: mismatching %1%2 at %3").arg(opening).arg(closing).arg(s)); +@@ -987 +987 @@ +- TRACE(TQString().sprintf("parse error: mismatching <> at %-20.20s", s)); ++ TRACE(TQString("parse error: mismatching <> at %1").arg(s)); +@@ -1103 +1103 @@ +- TRACE(TQString().sprintf("parse error: mismatching %c%c at %-20.20s", opening, closing, s)); ++ TRACE(TQString("parse error: mismatching %1%2 at %3").arg(opening).arg(closing).arg(s)); +@@ -1135 +1135 @@ +- TRACE(TQString().sprintf("parse error: not a name %-20.20s", s)); ++ TRACE(TQString("parse error: not a name %1").arg(s)); +@@ -1148 +1148 @@ +- TRACE(TQString().sprintf("parse error: not a name after static %-20.20s", s)); ++ TRACE(TQString("parse error: not a name after static %1").arg(s)); +@@ -1480 +1480 @@ +- TRACE(TQString().sprintf("found in array", l)); ++ TRACE(TQString("found in array").arg(l)); +--- kdbg/sourcewnd.cpp ++++ kdbg/sourcewnd.cpp +@@ -254 +254 @@ +- TRACE(TQString().sprintf("checking for bp at %d", line)); ++ TRACE(TQString("checking for bp at %1").arg(line)); +@@ -278 +278 @@ +- TRACE(TQString().sprintf("updating %s:%d", bp->fileName, bp->lineNo)); ++ TRACE(TQString("updating %1:%2").arg(bp->fileName).arg(bp->lineNo)); +@@ -373 +373 @@ +- TRACE(TQString().sprintf("left-clicked line %d", line)); ++ TRACE(TQString("left-clicked line %1").arg(line)); +@@ -378 +378 @@ +- TRACE(TQString().sprintf("mid-clicked row %d", line)); ++ TRACE(TQString("mid-clicked row %1").arg(line)); +--- kdbg/typetable.cpp ++++ kdbg/typetable.cpp +@@ -185 +185 @@ +- TRACE(type + TQString().sprintf(": %d exprs", info->m_numExprs)); ++ TRACE(type + TQString(": %1 exprs").arg(info->m_numExprs)); +EOF + ## edit man page sed -i "s|/opt/trinity/share/doc/|$INSTALL_TDE/share/doc/|" doc/man/kdbg.1 diff --git a/Apps/klamav/klamav.SlackBuild b/Apps/klamav/klamav.SlackBuild index d9db6a4..d17e39f 100644 --- a/Apps/klamav/klamav.SlackBuild +++ b/Apps/klamav/klamav.SlackBuild @@ -41,7 +41,8 @@ clamav_installed_fn || { ## .. build, package, and install it ( echo " - building clamav" + building clamav +" getsource_fn # to set SLKCFLAGS @@ -62,23 +63,35 @@ sed -i 's|set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")|set(CMAKE_INSTA ## install man pages as per Slackware default sed -i 's|/share/man/|/man/|' docs/CMakeLists.txt -mkdir build +mkdir -p build/docs ## install html documentation sed -i 's|OPTIONAL||' docs/CMakeLists.txt sed -i '100s|endif()||' docs/CMakeLists.txt sed -i '96iendif()' docs/CMakeLists.txt -mkdir build/docs cp -a docs/html build/docs/ +## clang build error: +#/tmp/build/clamav-0.103.3/clamonacc/clamonacc.c:335:96: error: use of undeclared identifier 'O_LARGEFILE' +# ctx->fan_fd = fanotify_init(FAN_CLASS_CONTENT | FAN_UNLIMITED_QUEUE | FAN_UNLIMITED_MARKS, O_LARGEFILE | O_RDONLY); +# ^ +[[ $COMPILER == clang ]] && \ +echo ' +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DO_LARGEFILE")' >> clamonacc/CMakeLists.txt + +[[ -s /usr/lib64/libmilter.a ]] && MILTER="ON" + [[ $GCC_VIS == 0 ]] && unset GCC_VIS # needs to be unset for parameter expansion for CMAKE_CXX_FLAGS cd build/ # LIBDIRSUFFIX not required - any suffix is included in CMAKE_INSTALL_LIBDIR cmake ${G_NINJA:-} \ -DCMAKE_C_FLAGS="$SLKCFLAGS" \ -DCMAKE_CXX_FLAGS="$SLKCFLAGS ${GCC_VIS:+-fvisibility=hidden -fvisibility-inlines-hidden}" \ + -DCMAKE_C_COMPILER=$COMPILER \ + -DCMAKE_CXX_COMPILER=$COMPILER_CXX \ -DCMAKE_BUILD_TYPE=Release \ - -DENABLE_SYSTEMD_DEFAULT="OFF" \ + -DENABLE_SYSTEMD="OFF" \ + -DENABLE_MILTER=${MILTER:-"OFF"} \ -Wno-dev \ .. diff --git a/Apps/koffice/koffice.SlackBuild b/Apps/koffice/koffice.SlackBuild index 1a85d4e..320840a 100755 --- a/Apps/koffice/koffice.SlackBuild +++ b/Apps/koffice/koffice.SlackBuild @@ -33,6 +33,45 @@ getsource_fn untar_fn +## clang build +## ../chalk/plugins/filters/colorsfilters/kis_brightness_contrast_filter.cpp:243:40: error: non-constant-expression cannot be narrowed from type 'int' to 'TQ_UINT8' (aka 'unsigned char') in initializer list [-Wc++11-narrowing] +## commit 7994981 +patch -p0 -N << EOF || true +--- chalk/plugins/filters/colorsfilters/kis_brightness_contrast_filter.cpp ++++ chalk/plugins/filters/colorsfilters/kis_brightness_contrast_filter.cpp +@@ -243,1 +243,1 @@ +- TQ_UINT8 weights[2] = {MAX_SELECTED - selectedness, selectedness}; ++ TQ_UINT8 weights[2] = {(TQ_UINT8)(MAX_SELECTED - selectedness), selectedness}; +--- chalk/plugins/filters/colorsfilters/colorsfilters.cpp ++++ chalk/plugins/filters/colorsfilters/colorsfilters.cpp +@@ -212,1 +212,1 @@ +- TQ_UINT8 weights[2] = {MAX_SELECTED - selectedness, selectedness}; ++ TQ_UINT8 weights[2] = {(TQ_UINT8)(MAX_SELECTED - selectedness), selectedness}; +@@ -306,1 +306,1 @@ +- TQ_UINT8 weights[2] = {MAX_SELECTED - selectedness, selectedness}; ++ TQ_UINT8 weights[2] = {(TQ_UINT8)(MAX_SELECTED - selectedness), selectedness}; +--- chalk/plugins/filters/colorsfilters/kis_perchannel_filter.cpp ++++ chalk/plugins/filters/colorsfilters/kis_perchannel_filter.cpp +@@ -257,1 +257,1 @@ +- TQ_UINT8 weights[2] = {MAX_SELECTED - selectedness, selectedness}; ++ TQ_UINT8 weights[2] = {(TQ_UINT8)(MAX_SELECTED - selectedness), selectedness}; +--- chalk/plugins/filters/levelfilter/kis_level_filter.cpp ++++ chalk/plugins/filters/levelfilter/kis_level_filter.cpp +@@ -198,1 +198,1 @@ +- TQ_UINT8 weights[2] = {MAX_SELECTED - selectedness, selectedness}; ++ TQ_UINT8 weights[2] = {(TQ_UINT8)(MAX_SELECTED - selectedness), selectedness}; +--- filters/kspread/excel/sidewinder/cell.cpp ++++ filters/kspread/excel/sidewinder/cell.cpp +@@ -120,1 +120,1 @@ +- char buf[3] = { 'A'+(d/26), 'A'+(d%26), 0}; ++ char buf[3] = { (char)('A'+(d / 26)), (char)('A'+(d % 26)), 0}; +--- filters/kword/rtf/import/rtfimport.cpp ++++ filters/kword/rtf/import/rtfimport.cpp +@@ -1270,1 +1270,1 @@ +- char tmpch[2] = {token.value, '\0'}; ++ char tmpch[2] = {(char)(token.value), '\0'}; +EOF + ## Workaround to prevent chalk/krita crashing when loading PNGs it has saved ## Awaiting fix for koffice issue 20 patch -p0 << EOF diff --git a/Apps/krusader/krusader.SlackBuild b/Apps/krusader/krusader.SlackBuild index 777778f..69d6590 100755 --- a/Apps/krusader/krusader.SlackBuild +++ b/Apps/krusader/krusader.SlackBuild @@ -34,7 +34,7 @@ getsource_fn untar_fn ## patches for building with clang -echo $' +patch -p0 -N << EOF || true --- krusader/Konfigurator/kgstartup.cpp +++ krusader/Konfigurator/kgstartup.cpp @@ -58,3 +58,4 @@ @@ -61,9 +61,25 @@ echo $' @@ -229 +228,0 @@ - static TQPixmap getIcon(vfile *vf); ' | while read line -do -patch -p0 -done +EOF +# +## clang build +## ../../../../krusader/DiskUsage/radialMap/map.cpp:329:26: error: non-constant-expression cannot be narrowed from type 'uint' (aka 'unsigned int') to 'int' in initializer list [-Wc++11-narrowing] +## int a[3] = { (*it)->start(), (*it)->length(), 0 }; +## ^~~~~~~~~~~~~~ +## commit 57f84ff +patch -p0 -N << EOF || true +--- krusader/DiskUsage/radialMap/map.cpp ++++ krusader/DiskUsage/radialMap/map.cpp +@@ -329,1 +329,1 @@ +- int a[3] = { (*it)->start(), (*it)->length(), 0 }; ++ uint a[3] = { (*it)->start(), (*it)->length(), 0 }; +--- krusader/UserAction/useraction.cpp ++++ krusader/UserAction/useraction.cpp +@@ -113,1 +113,1 @@ +- i18n( "The actionfile's root-element isn't called "ACTION_ROOT", using %1").arg( filename ), ++ i18n( "The actionfile's root-element isn't called " ACTION_ROOT ", using %1").arg( filename ), +EOF # set support for additional language(s) as per I18N variable # but only for languages available with this package diff --git a/Apps/ktorrent/ktorrent.SlackBuild b/Apps/ktorrent/ktorrent.SlackBuild index 1a22365..2ccbe31 100755 --- a/Apps/ktorrent/ktorrent.SlackBuild +++ b/Apps/ktorrent/ktorrent.SlackBuild @@ -34,6 +34,26 @@ getsource_fn untar_fn +## clang build +## ../plugins/infowidget/chunkbar.cpp:210:16: error: non-constant-expression cannot be narrowed from type 'bt::Uint32' (aka 'unsigned int') to 'int' in initializer list [-Wc++11-narrowing] +# commit 3ce1e1c +patch -p0 -N << EOF || true +--- plugins/infowidget/chunkbar.cpp ++++ plugins/infowidget/chunkbar.cpp +@@ -210,1 +210,1 @@ +- Range r = {i,i,0}; ++ Range r = {(int)i,(int)i,0}; +@@ -222,1 +222,1 @@ +- Range r = {i,i,0}; ++ Range r = {(int)i,(int)i,0}; +@@ -259,1 +259,1 @@ +- Range r = {i,i,fac}; ++ Range r = {(int)i,(int)i,fac}; +@@ -271,1 +271,1 @@ +- Range r = {i,i,fac}; ++ Range r = {(int)i,(int)i,fac}; +EOF + # set support for additional language(s) as per I18N variable # but only for languages available with this package langs="";for Lang in $I18N;do [[ -e translations/$Lang ]] && langs="$langs $Lang";done diff --git a/Core/tdeedu/tdeedu.SlackBuild b/Core/tdeedu/tdeedu.SlackBuild index bfdb3c5..57105c8 100755 --- a/Core/tdeedu/tdeedu.SlackBuild +++ b/Core/tdeedu/tdeedu.SlackBuild @@ -166,8 +166,34 @@ patch -p0 << EOF +#endif EOF +## clang build error: +#amd64.S:728:9: error: changed section flags for .rodata.cst8, expected: 0x12 +# .section .rodata.cst8,"a",@progbits +# ^ +#amd64.S:728:9: error: changed section entsize for .rodata.cst8, expected: 8 +# .section .rodata.cst8,"a",@progbits +# ^ +## backport from ocaml commit 8a46d76bf9359b5cc505b3f2f9c81eb624c631fa +patch -p0 << EOF +--- asmcomp/amd64/emit.mlp ++++ asmcomp/amd64/emit.mlp +@@ -993,1 +993,1 @@ +- | _ -> D.section [".rodata.cst8"] (Some "a") ["@progbits"] ++ | _ -> D.section [".rodata.cst16"] (Some "aM") ["@progbits";"16"] +@@ -1053,2 +1053,3 @@ +- | _ -> D.section [".rodata.cst8"] (Some "a") ["@progbits"] ++ | _ -> D.section [".rodata.cst8"] (Some "aM") ["@progbits";"8"] + end; ++ D.align 8; +--- asmrun/amd64.S ++++ asmrun/amd64.S +@@ -728,1 +728,1 @@ +- .section .rodata.cst8,"a",@progbits ++ .section .rodata.cst16,"aM",@progbits,16 +EOF + ## force "gcc -fcommon" for gcc10 build - see https://github.com/ocaml/ocaml/issues/9622 -./configure -cc "gcc -fcommon" -libdir /usr/local/lib$LIBDIRSUFFIX/ocaml +./configure -cc "$COMPILER -fcommon" -libdir /usr/local/lib$LIBDIRSUFFIX/ocaml ## finish build with -j1 if there are race condition errors make ${NUMJOBS:-} world.opt || make world.opt DESTDIR=$TMP_BUILD/package-ocaml make install @@ -185,6 +211,7 @@ tar xf $BUILD_TDE_ROOT/src/facile-1.1.3.tar.gz cd facile-1.1.3/ sed -i 's|mkdir|& -p|' Makefile +## uses ocaml compiler ./configure make make FACILEDIR=$TMP_BUILD/package-facile/usr/local/lib$LIBDIRSUFFIX/ocaml/facile install diff --git a/Core/tdenetwork/tdenetwork.SlackBuild b/Core/tdenetwork/tdenetwork.SlackBuild index e57516a..2c7eb71 100755 --- a/Core/tdenetwork/tdenetwork.SlackBuild +++ b/Core/tdenetwork/tdenetwork.SlackBuild @@ -33,6 +33,15 @@ getsource_fn untar_fn +## commit 4fa7deb, TDE issue 44 +patch -p0 -N << EOF || true +--- krfb/libvncserver/main.cpp ++++ krfb/libvncserver/main.cpp +@@ -21,1 +21,1 @@ +- #define true -1 ++ #define true 1 +EOF + listdocs_fn chown_fn diff --git a/Core/tdeutils/tdeutils.SlackBuild b/Core/tdeutils/tdeutils.SlackBuild index 535af28..c60f9be 100755 --- a/Core/tdeutils/tdeutils.SlackBuild +++ b/Core/tdeutils/tdeutils.SlackBuild @@ -33,17 +33,18 @@ getsource_fn untar_fn -## Re: issue 28 -## work-around for clang build failure - flag applied to kmilo generic build only +## clang build failure ## ...kmilo/generic/generic_monitor.cpp:78:16: error: non-constant-expression cannot be narrowed from type 'int' to 'uint' (aka 'unsigned int') in initializer list [-Wc++11-narrowing] ## { "Search", TDEShortcut("XF86Search"), TQT_SLOT(launchSearch()) }, ## ^~~~~~~~~~~~~~~~~~~~~~~~~ -[[ $COMPILER_CXX == clang++ ]] && { -## pending upstream fix -[[ $(grep 'Search", TDEShortcut("XF86Search"), TQT_SLOT' kmilo/generic/generic_monitor.cpp) ]] && \ -echo ' -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-c++11-narrowing")' >> kmilo/generic/CMakeLists.txt -} +## commit 4046d4e - fixes issue 28 +patch -p0 -N << EOF || true +--- kmilo/generic/generic_monitor.h ++++ kmilo/generic/generic_monitor.h +@@ -42,1 +42,1 @@ namespace KMilo { +- uint symbol; ++ int symbol; +EOF ## set installation directory for superkaramba.desktop file sed -i 's|DESTINATION ${APPS_INSTALL_DIR}/Utilities|DESTINATION ${XDG_APPS_INSTALL_DIR}|' superkaramba/src/CMakeLists.txt @@ -69,11 +70,11 @@ cmake ${G_NINJA:-} \ -DWITH_XSCREENSAVER="OFF" \ -DWITH_SENSORS="ON" \ -DWITH_SNMP="OFF" \ - -DWITH_ASUS="OFF" \ + -DWITH_ASUS="ON" \ -DWITH_POWERBOOK="OFF" \ -DWITH_POWERBOOK2="OFF" \ - -DWITH_VAIO="OFF" \ - -DWITH_THINKPAD="OFF" \ + -DWITH_VAIO="ON" \ + -DWITH_THINKPAD="ON" \ -DWITH_I8K="OFF" \ -DWITH_XMMS="OFF" \ -DWITH_TDENEWSTUFF="OFF" \ diff --git a/Deps/akode/akode.SlackBuild b/Deps/akode/akode.SlackBuild index 3740344..83bd7ed 100755 --- a/Deps/akode/akode.SlackBuild +++ b/Deps/akode/akode.SlackBuild @@ -33,6 +33,179 @@ getsource_fn untar_fn +## for ffmpeg-5, branch 14.0.x, commit 9e2710c +patch -p0 -N << EOF || true +--- akode/plugins/ffmpeg_decoder/ffmpeg_decoder.cpp ++++ akode/plugins/ffmpeg_decoder/ffmpeg_decoder.cpp +@@ -40 +40 @@ +-#if LIBAVCODEC_VERSION_MAJOR < 58 ++#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(57, 33, 100) +@@ -72,4 +71,0 @@ +-/* +-void FFMPEGDecoderPlugin::initializeFFMPEG() { +- av_register_all(); +-}*/ +@@ -84 +80,2 @@ +- eof(false), error(false), initialized(false), retries(0) {}; ++ eof(false), error(false), initialized(false), retries(0), ++ packet(NULL), audioStream_ctx(NULL), videoStream_ctx(NULL) {}; +@@ -92,0 +90,2 @@ ++ AVCodecContext *audioStream_ctx; ++ AVCodecContext *videoStream_ctx; +@@ -94 +93,4 @@ +- AVPacket packet; ++ AVPacket *packet; ++#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(57, 12, 100) ++ AVPacket _packet; ++#endif +@@ -115,0 +118,3 @@ ++#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(58,9,100) ++ av_register_all(); ++#endif +@@ -209,3 +214,3 @@ +- // Set config +- if (!setAudioConfiguration(&d->config, d->ic->streams[d->audioStream]->codec)) +- { ++ d->codec = (AVCodec *)avcodec_find_decoder(d->ic->streams[d->audioStream]->CODECPAR->codec_id); ++ if (!d->codec) { ++ std::cerr << "akode: FFMPEG: Codec not found\n"; +@@ -216,3 +221,8 @@ +- d->codec = avcodec_find_decoder(d->ic->streams[d->audioStream]->CODECPAR->codec_id); +- if (!d->codec) { +- std::cerr << "akode: FFMPEG: Codec not found\n"; ++#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(57, 33, 100) ++ // allocate a codec context ++ d->audioStream_ctx = avcodec_alloc_context3(d->codec); ++ if (d->audioStream_ctx) { ++ avcodec_parameters_to_context(d->audioStream_ctx, d->ic->streams[d->audioStream]->codecpar); ++ } ++ else { ++ std::cerr << "akode: failed to allocate an audio codec context\n"; +@@ -222 +232,17 @@ +- avcodec_open2( d->ic->streams[d->audioStream]->codec, d->codec, NULL ); ++#else ++ d->audioStream_ctx = d->ic->streams[d->audioStream]->codec; ++#endif ++ ++ // Set config ++ if (!setAudioConfiguration(&d->config, d->audioStream_ctx)) ++ { ++ closeFile(); ++#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(57, 33, 100) ++ avcodec_free_context(&d->audioStream_ctx); ++#else ++ d->audioStream_ctx = NULL; ++#endif ++ return false; ++ } ++ ++ avcodec_open2( d->audioStream_ctx, d->codec, NULL ); +@@ -242 +268 @@ +- av_free_packet(&d->packet); ++ av_free_packet(&d->_packet); +@@ -244 +270 @@ +- av_packet_unref( &d->packet ); ++ av_packet_unref( d->packet ); +@@ -245,0 +272 @@ ++ d->packet = NULL; +@@ -250 +277,6 @@ +- avcodec_close( d->ic->streams[d->audioStream]->codec ); ++ avcodec_close( d->audioStream_ctx ); ++#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(57, 33, 100) ++ avcodec_free_context(&d->audioStream_ctx); ++#else ++ d->audioStream_ctx = NULL; ++#endif +@@ -254,0 +287 @@ ++#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(59, 0, 100) +@@ -255,0 +289 @@ ++#endif +@@ -266,2 +300,7 @@ +- av_init_packet(&d->packet); +- if ( av_read_frame(d->ic, &d->packet) < 0 ) { ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 12, 100) ++ d->packet = av_packet_alloc(); ++#else ++ av_init_packet(&d->_packet); ++ d->packet = &d->_packet; ++#endif ++ if ( av_read_frame(d->ic, d->packet) < 0 ) { +@@ -269 +308 @@ +- av_free_packet(&d->packet); ++ av_free_packet(&d->_packet); +@@ -271 +310 @@ +- av_packet_unref( &d->packet ); ++ av_packet_unref( d->packet ); +@@ -272,0 +312 @@ ++ d->packet = NULL; +@@ -277,3 +317,3 @@ +- if (d->packet.stream_index == d->audioStream) { +- d->packetSize = d->packet.size; +- d->packetData = d->packet.data; ++ if (d->packet->stream_index == d->audioStream) { ++ d->packetSize = d->packet->size; ++ d->packetData = d->packet->data; +@@ -283 +323 @@ +- av_free_packet(&d->packet); ++ av_free_packet(&d->_packet); +@@ -285 +325 @@ +- av_packet_unref(&d->packet); ++ av_packet_unref(d->packet); +@@ -286,0 +327 @@ ++ d->packet = NULL; +@@ -327 +368 @@ +- assert(d->packet.stream_index == d->audioStream); ++ assert(d->packet->stream_index == d->audioStream); +@@ -339 +380,23 @@ +- int len = avcodec_decode_audio4( d->ic->streams[d->audioStream]->codec, ++ ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 12, 100) ++ int len = avcodec_receive_frame(d->audioStream_ctx, decodeFrame); ++ if (len == 0) { ++ decoded = 1; ++ } ++ else if (len == AVERROR(EAGAIN)) { ++ len = 0; ++ } ++ ++ if (len == 0) { ++ len = avcodec_send_packet(d->audioStream_ctx, d->packet); ++ if (len == AVERROR(EAGAIN)) { ++ len = 0; ++ } ++ else ++ { ++ len = d->packet->size; ++ d->packetSize = d->packet->size; ++ } ++ } ++#else ++ int len = avcodec_decode_audio4( d->audioStream_ctx, +@@ -341 +404 @@ +- &d->packet ); ++ d->packet ); +@@ -343 +406 @@ +- d->packetSize = d->packet.size; ++ d->packetSize = d->packet->size; +@@ -346,0 +410,2 @@ ++#endif ++ +@@ -349 +414 @@ +- d->buffer_size = decodeFrame->nb_samples * d->ic->streams[d->audioStream]->codec->channels * av_get_bytes_per_sample(d->ic->streams[d->audioStream]->codec->sample_fmt); ++ d->buffer_size = decodeFrame->nb_samples * d->ic->streams[d->audioStream]->CODECPAR->channels * av_get_bytes_per_sample(d->ic->streams[d->audioStream]->codec->sample_fmt); +@@ -351 +416 @@ +- d->buffer_size = decodeFrame->nb_samples * decodeFrame->channels * av_get_bytes_per_sample(d->ic->streams[d->audioStream]->codec->sample_fmt); ++ d->buffer_size = decodeFrame->nb_samples * decodeFrame->channels * av_get_bytes_per_sample(d->audioStream_ctx->sample_fmt); +@@ -397 +462 @@ +- av_free_packet(&d->packet); ++ av_free_packet(&d->_packet); +@@ -399 +464 @@ +- av_packet_unref( &d->packet ); ++ av_packet_unref( d->packet ); +@@ -400,0 +466 @@ ++ d->packet = NULL; +EOF + chown_fn cd_builddir_fn diff --git a/Misc/inkscape/inkscape.SlackBuild b/Misc/inkscape/inkscape.SlackBuild index 318acee..ce0a3ac 100755 --- a/Misc/inkscape/inkscape.SlackBuild +++ b/Misc/inkscape/inkscape.SlackBuild @@ -24,7 +24,7 @@ # SUCH DAMAGE. PRGNAM=inkscape -VERSION=1.1.1 +VERSION=1.1.2 BUILD=${BUILD:-1} ARCHIVE_TYPE="tar.xz" @@ -34,7 +34,7 @@ source ../../get-source.sh ## need this here for CXX_FLAGS for double-conversion getsource_fn -## inkscape v1.1.1 needs double-conversion +## inkscape v1.1.x needs double-conversion [[ $(cat $TMPVARS/PRE_DOWNLOAD) != yes ]] && { # ### double-conversion - start { @@ -53,7 +53,11 @@ cd double-conversion-3.1.5/ cd cmake/ # LIBDIRSUFFIX not required - builds to lib64 where appropriate .. -cmake ${G_NINJA:-} ../ -DBUILD_SHARED_LIBS=ON -DCMAKE_CXX_FLAGS="$SLKCFLAGS" +cmake ${G_NINJA:-} \ + -DBUILD_SHARED_LIBS=ON \ + -DCMAKE_CXX_FLAGS="$SLKCFLAGS" \ + -DCMAKE_CXX_COMPILER=$COMPILER_CXX \ + .. PKG=$TMP_BUILD/package-double-conversion make_fn @@ -75,19 +79,80 @@ echo -e "\n ############ \n\n\033[39;1m double-conversion is not installed and i untar_fn -## patch for poppler 21.11 -## https://gitlab.com/inkscape/inkscape/-/commit/5724c21b9cb7b6176a7b36ca24068b148c817e82.diff -echo $'--- src/extension/internal/pdfinput/pdf-parser.cpp +## patch for poppler 22.03+ +## inkscape commit a18c57ffff313fd08bc8a44f6b6bf0b01d7e9b75 +patch -p0 << EOF +--- src/extension/internal/pdfinput/pdf-input.cpp ++++ src/extension/internal/pdfinput/pdf-input.cpp +@@ -671,2 +671,1 @@ PdfInput::open(::Inkscape::Extension::Input * /*mod*/, const gchar * uri) { +- GooString *filename_goo = new GooString(uri); +- pdf_doc = std::make_shared(filename_goo, nullptr, nullptr, nullptr); // TODO: Could ask for password ++ pdf_doc = _POPPLER_MAKE_SHARED_PDFDOC(uri); // TODO: Could ask for password +--- src/extension/internal/pdfinput/poppler-transition-api.h ++++ src/extension/internal/pdfinput/poppler-transition-api.h +@@ -17,0 +17,6 @@ ++#if POPPLER_CHECK_VERSION(22, 3, 0) ++#define _POPPLER_MAKE_SHARED_PDFDOC(uri) std::make_shared(std::make_unique(uri)) ++#else ++#define _POPPLER_MAKE_SHARED_PDFDOC(uri) std::make_shared(new GooString(uri), nullptr, nullptr, nullptr) ++#endif ++ +EOF + +## patch for poppler 22.04+ +## inkscape commit d989cdf1059c78bc3bb6414330242073768d640b +patch -p0 << EOF +--- src/extension/internal/pdfinput/pdf-parser.cpp +++ src/extension/internal/pdfinput/pdf-parser.cpp -@@ -2171,3 +2171,7 @@ - printf(" font: tag=%s name='\''%s'\'' %g\n", -+#if POPPLER_CHECK_VERSION(21,11,0) -+ font->getTag().c_str(), +@@ -33,0 +33,1 @@ ++#include "poppler-transition-api.h" +@@ -2161,1 +2162,1 @@ +- GfxFont *font = res->lookupFont(args[0].getName()); ++ auto font = res->lookupFont(args[0].getName()); +@@ -2182,1 +2183,3 @@ ++#if !POPPLER_CHECK_VERSION(22, 4, 0) + font->incRefCnt(); ++#endif +@@ -2376,1 +2379,0 @@ +- GfxFont *font; +@@ -2395,1 +2397,1 @@ +- font = state->getFont(); ++ auto font = state->getFont(); +@@ -2448,4 +2450,4 @@ +- _POPPLER_CALL_ARGS(charProc, ((Gfx8BitFont *)font)->getCharProc, code); +- if ((resDict = ((Gfx8BitFont *)font)->getResources())) { ++ _POPPLER_CALL_ARGS(charProc, _POPPLER_FONTPTR_TO_GFX8(font)->getCharProc, code); ++ if (resDict = _POPPLER_FONTPTR_TO_GFX8(font)->getResources()) { + pushResources(resDict); +- } ++ } +--- src/extension/internal/pdfinput/poppler-transition-api.h ++++ src/extension/internal/pdfinput/poppler-transition-api.h +@@ -17,0 +17,6 @@ ++#if POPPLER_CHECK_VERSION(22, 4, 0) ++#define _POPPLER_FONTPTR_TO_GFX8(font_ptr) ((Gfx8BitFont *)font_ptr.get()) +#else - font->getTag()->getCString(), ++#define _POPPLER_FONTPTR_TO_GFX8(font_ptr) ((Gfx8BitFont *)font_ptr) +#endif - font->getName() ? font->getName()->getCString() : "???", -' | patch -p0 ++ +--- src/extension/internal/pdfinput/svg-builder.cpp ++++ src/extension/internal/pdfinput/svg-builder.cpp +@@ -111,1 +111,0 @@ +- _current_font = nullptr; +@@ -1024,5 +1023,2 @@ +- if (_font_style) { +- //sp_repr_css_attr_unref(_font_style); +- } + _font_style = sp_repr_css_attr_new(); +- GfxFont *font = state->getFont(); ++ auto font = state->getFont(); +@@ -1174,1 +1170,0 @@ +- _current_font = font; +--- src/extension/internal/pdfinput/svg-builder.h ++++ src/extension/internal/pdfinput/svg-builder.h +@@ -206,1 +206,0 @@ +- GfxFont *_current_font; +EOF ## set internal 2geom lib paths to lib$LIBDIRSUFFIX sed -i "s|CMAKE_INSTALL_PREFIX}/lib|&$LIBDIRSUFFIX|" src/3rdparty/2geom/CMakeLists.txt diff --git a/Misc/mp4v2/mp4v2.SlackBuild b/Misc/mp4v2/mp4v2.SlackBuild index d186e8d..5c6e26f 100644 --- a/Misc/mp4v2/mp4v2.SlackBuild +++ b/Misc/mp4v2/mp4v2.SlackBuild @@ -74,6 +74,14 @@ patch -N -p0 << EOF || true + switch( static_cast( code ) ) { EOF +## clang build errors: +## invalid suffix on literal; C++11 requires a space between literal and identifier +sed -i 's|"LIBMPV42_STRINGIFY|" LIBMPV42_STRINGIFY|' src/mp4util.h +# +## ../src/mp4.cpp:873:20: error: cannot initialize return object of type 'mp4v2_ismacrypParams *' (aka 'mp4v2_ismacryp_session_params *') with an rvalue of type 'MP4TrackId' (aka 'unsigned int') +## thanks to github.com/palmerc/mp4v2.git, commit 16eb774806e9a0c87162b9e24a633c34c90c0732 +sed -i '873s|return.*$|return NULL;|' src/mp4.cpp + ## Fix man pages being installed with no content sed -i 's|doc/man|@srcdir@/&|' GNUmakefile.in