Skip to content

Commit

Permalink
chinese/fctx: Get rid of MANPREFIX and install mans to share/man.
Browse files Browse the repository at this point in the history
To achieve this, add a temporary hacky knob KDE_MAN_PREFIX to allow ports to
override the man installation dir. Once Uses/kde.mk migrates to share/man, this
knob will be removed.

Approved by:	tcberner
  • Loading branch information
arrowd committed Jan 15, 2024
1 parent 42714c6 commit d8be971
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 17 deletions.
6 changes: 4 additions & 2 deletions Mk/Uses/kde.mk
Expand Up @@ -249,8 +249,10 @@ CMAKE_ARGS+= -DCMAKE_MODULE_PATH="${LOCALBASE};${KDE_PREFIX}" \
-DKDE_INSTALL_USE_QT_SYS_PATHS:BOOL=true

# Set man-page installation prefix.
CMAKE_ARGS+= -DKDE_INSTALL_MANDIR:PATH="${KDE_PREFIX}/man" \
-DMAN_INSTALL_DIR:PATH="${KDE_PREFIX}/man"
# TODO: Remove the KDE_MAN_PREFIX knob once all kde ports are switched to use share/man
KDE_MAN_PREFIX?= ${KDE_PREFIX}/man
CMAKE_ARGS+= -DKDE_INSTALL_MANDIR:PATH="${KDE_MAN_PREFIX}" \
-DMAN_INSTALL_DIR:PATH="${KDE_MAN_PREFIX}"

# Disable autotests unless TEST_TARGET is defined.
. if !defined(TEST_TARGET)
Expand Down
2 changes: 1 addition & 1 deletion chinese/fcitx/Makefile
Expand Up @@ -64,13 +64,13 @@ TPUNC_DESC= Use traditional quotation marks

.include <bsd.port.options.mk>

KDE_MAN_PREFIX= ${PREFIX}/share/man
CMAKE_ARGS+= -DENABLE_XDGAUTOSTART=OFF -DFORCE_ENCHANT=ON \
-DLIBICONV_LIBC_HAS_ICONV_OPEN=OFF \
-DDATADIR=${DATADIR} \
-DDOCSDIR=${DOCSDIR} \
-DGOBJECT_INTROSPECTION_GIRDIR=${PREFIX}/share/gir-1.0 \
-DGOBJECT_INTROSPECTION_TYPELIBDIR=${PREFIX}/lib/girepository-1.0 \
-DMANPREFIX=${MANPREFIX} \
-DPREFIX=${PREFIX} \
-DENABLE_QT=OFF -DENABLE_QT_IM_MODULE=OFF -DENABLE_QT_GUI=OFF

Expand Down
9 changes: 4 additions & 5 deletions chinese/fcitx/files/patch-CMakeLists.txt
@@ -1,17 +1,16 @@
--- CMakeLists.txt.orig 2015-12-12 08:02:09 UTC
--- CMakeLists.txt.orig 2020-08-01 01:40:38 UTC
+++ CMakeLists.txt
@@ -206,16 +206,21 @@ if (NOT DEFINED SYSCONFDIR)
@@ -200,16 +200,21 @@ endif()
set(SYSCONFDIR "${CMAKE_INSTALL_PREFIX}/etc" CACHE PATH "sys config directory [default=PREFIX/etc/]")
endif()

-set(includedir "${CMAKE_INSTALL_PREFIX}/include")
-set(libdir ${LIB_INSTALL_DIR})
-set(pkgconfdir ${LIBDATA_INSTALL_DIR}/pkgconfig)
-set(mandir ${MAN_INSTALL_DIR})
+set(includedir "${PREFIX}/include")
+set(libdir ${PREFIX}/lib)
+set(pkgconfdir ${PREFIX}/libdata/pkgconfig)
+set(mandir ${MANPREFIX}/man)
set(mandir ${MAN_INSTALL_DIR})
set(addondir ${libdir}/${package} )
-set(pkgdatadir ${prefix}/share/${package})
+set(addondestdir "\${PREFIX}/lib/${package}" )
Expand All @@ -28,7 +27,7 @@

list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${LIB_INSTALL_DIR}" _isSystemPlatformLibDir)
list(FIND CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "${LIB_INSTALL_DIR}" _isSystemCxxLibDir)
@@ -228,9 +233,13 @@ endif("${_isSystemPlatformLibDir}" STREQ
@@ -222,9 +227,13 @@ set(FCITX4_ADDON_INSTALL_DIR ${addondir})

# For FcitxMacro
set(FCITX4_ADDON_INSTALL_DIR ${addondir})
Expand Down
18 changes: 9 additions & 9 deletions chinese/fcitx/pkg-plist
Expand Up @@ -126,15 +126,15 @@ libdata/pkgconfig/fcitx-config.pc
libdata/pkgconfig/fcitx-gclient.pc
libdata/pkgconfig/fcitx-utils.pc
libdata/pkgconfig/fcitx.pc
man/man1/createPYMB.1.gz
man/man1/fcitx-remote.1.gz
man/man1/fcitx.1.gz
man/man1/mb2org.1.gz
man/man1/mb2txt.1.gz
man/man1/readPYBase.1.gz
man/man1/readPYMB.1.gz
man/man1/scel2org.1.gz
man/man1/txt2mb.1.gz
share/man/man1/createPYMB.1.gz
share/man/man1/fcitx-remote.1.gz
share/man/man1/fcitx.1.gz
share/man/man1/mb2org.1.gz
share/man/man1/mb2txt.1.gz
share/man/man1/readPYBase.1.gz
share/man/man1/readPYMB.1.gz
share/man/man1/scel2org.1.gz
share/man/man1/txt2mb.1.gz
share/applications/fcitx-configtool.desktop
share/applications/fcitx-skin-installer.desktop
share/applications/fcitx.desktop
Expand Down

0 comments on commit d8be971

Please sign in to comment.