diff options
author | Erik Kundiman <erik@megapahit.org> | 2025-04-07 12:14:09 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2025-04-07 12:14:09 +0800 |
commit | e282774e68dc4e1826517a3dd4ab09714adcca26 (patch) | |
tree | 8df14fab1d395256c8ca920be88a2eb417486b76 /indra | |
parent | 415bfb74fd52b200f21031e78a4ca9fd5e595978 (diff) |
Make it build & install, USING Portage, on Gentoo
Gentoo uses lib64, just like Fedora, and has libexec too.
The necessary step to install dependencies is part of the ebuild script
now (tracked in another repo, ebuild.git).
One thing I forgot to mention on the commit in that ebuild repo is,
unzip.h is provided on Gentoo only by minizip, and not minizip-ng cause
somehow the (minizip) "compat" USE flag couldn't be turned on somehow,
and there was no "minizip" (without -ng) package on Gentoo, but it was
achievable by setting the "minizip" USE flag on the zlib (again, without
-ng) package.
The queue header inclusion is needed cause its absence would cause the
compiling to fail on Portage (though it compiled when building the
viewer manually without Portage).
Also, using the prebuilt Meshoptimizer caused some linking errors when
using Portage (though, again, it linked when building the viewer
manually without Portage), hence Meshoptimizer is built from source as
part of the CMake configuration on Gentoo, differing from fellow Linux
distros.
Now Collada DOM, firstly the unpack destination directory is moved to
inside the build directory now, to make it uniform with other 3rd-party
files, just for less confusion. Secondly, since the patching that takes
effect is the one done by Portage, it would kill the process when there
are offending failed patchings (ones that generate .rej, reject files),
and they are the vcxproj patchings which aren't used anyway. Thirdly,
the hash checking on the downloaded file, that would fail anyway since
Portage doesn't allow any downloading that isn't part of the ebuild,
unfortunately has to be skipped so the emerge process wouldn't be killed
just because of it. Ebuild has its own sum checking (though this means
this particular file is not checked on other platforms, but other files
aren't checked either anyway yet).
Last but not least, the XDG Application category is removed because it's
considered deprecated by Portage, though not fatal, but the viewer is
already shown well in the Internet (Network) submenu anyway on unix
desktops.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/cmake/LibraryInstall.cmake | 2 | ||||
-rw-r--r-- | indra/cmake/Meshoptimizer.cmake | 4 | ||||
-rw-r--r-- | indra/cmake/Prebuilt.cmake | 6 | ||||
-rw-r--r-- | indra/cmake/UnixInstall.cmake | 2 | ||||
-rw-r--r-- | indra/llprimitive/CMakeLists.txt | 2 | ||||
-rw-r--r-- | indra/llwebrtc/CMakeLists.txt | 2 | ||||
-rw-r--r-- | indra/media_plugins/cef/CMakeLists.txt | 2 | ||||
-rw-r--r-- | indra/media_plugins/libvlc/CMakeLists.txt | 2 | ||||
-rw-r--r-- | indra/newview/ViewerInstall.cmake | 2 | ||||
-rwxr-xr-x | indra/newview/linux_tools/megapahit.desktop | 2 | ||||
-rw-r--r-- | indra/newview/llcallingcard.h | 1 |
11 files changed, 14 insertions, 13 deletions
diff --git a/indra/cmake/LibraryInstall.cmake b/indra/cmake/LibraryInstall.cmake index 1289ce02af..a843f40c99 100644 --- a/indra/cmake/LibraryInstall.cmake +++ b/indra/cmake/LibraryInstall.cmake @@ -4,7 +4,7 @@ list(REMOVE_ITEM ${PROJECT_NAME}_HEADER_FILES CMakeLists.txt) if (BUILD_SHARED_LIBS) if (${LINUX_DISTRO} MATCHES debian OR (${LINUX_DISTRO} MATCHES ubuntu)) set(_LIB lib/${ARCH}-linux-gnu) - elseif (${LINUX_DISTRO} MATCHES fedora OR (${LINUX_DISTRO} MATCHES opensuse-tumbleweed)) + elseif (${LINUX_DISTRO} MATCHES fedora OR (${LINUX_DISTRO} MATCHES opensuse-tumbleweed) OR (${LINUX_DISTRO} MATCHES gentoo)) set(_LIB lib${ADDRESS_SIZE}) else () set(_LIB lib) diff --git a/indra/cmake/Meshoptimizer.cmake b/indra/cmake/Meshoptimizer.cmake index e1bfe10e93..d893ea35b2 100644 --- a/indra/cmake/Meshoptimizer.cmake +++ b/indra/cmake/Meshoptimizer.cmake @@ -14,7 +14,7 @@ elseif (${LINUX_DISTRO} MATCHES debian OR (${LINUX_DISTRO} MATCHES ubuntu) OR CM return () endif (NOT USESYSTEMLIBS) -if (LINUX OR NOT USESYSTEMLIBS) +if (LINUX AND NOT (${LINUX_DISTRO} MATCHES gentoo) OR NOT USESYSTEMLIBS) use_prebuilt_binary(meshoptimizer) elseif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/meshoptimizer_installed OR NOT ${meshoptimizer_installed} EQUAL 0) if (NOT EXISTS ${CMAKE_BINARY_DIR}/meshoptimizer-0.21.tar.gz) @@ -45,7 +45,7 @@ elseif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRA ) file(WRITE ${PREBUILD_TRACKING_DIR}/meshoptimizer_installed "${meshoptimizer_installed}") endif (${MESHOPTIMIZER_RESULT}) -endif (LINUX OR NOT USESYSTEMLIBS) +endif (LINUX AND NOT (${LINUX_DISTRO} MATCHES gentoo) OR NOT USESYSTEMLIBS) if (NOT USESYSTEMLIBS AND WINDOWS) target_link_libraries( ll::meshoptimizer INTERFACE meshoptimizer.lib) diff --git a/indra/cmake/Prebuilt.cmake b/indra/cmake/Prebuilt.cmake index 051435e7cb..751e83051f 100644 --- a/indra/cmake/Prebuilt.cmake +++ b/indra/cmake/Prebuilt.cmake @@ -123,10 +123,10 @@ find_package(Patch) # Download the third party software archive and patch it. macro(prepare_thirdparty url filename dirname patch hash) - file(DOWNLOAD ${url} ${filename} EXPECTED_HASH SHA512=${hash}) + file(DOWNLOAD ${url} ${filename}) file(ARCHIVE_EXTRACT INPUT ${filename} - DESTINATION ${CMAKE_SOURCE_DIR}/../..) + DESTINATION ${CMAKE_BINARY_DIR}) execute_process(COMMAND ${Patch_EXECUTABLE} "-p1" "-i" ${CMAKE_SOURCE_DIR}/../patches/${patch} - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/../../${dirname}) + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/${dirname}) endmacro() diff --git a/indra/cmake/UnixInstall.cmake b/indra/cmake/UnixInstall.cmake index 48d84dc062..1fd17a0142 100644 --- a/indra/cmake/UnixInstall.cmake +++ b/indra/cmake/UnixInstall.cmake @@ -16,7 +16,7 @@ if (INSTALL) if (${LINUX_DISTRO} MATCHES debian OR (${LINUX_DISTRO} MATCHES ubuntu)) set(_LIB lib/${ARCH}-linux-gnu) - elseif (${LINUX_DISTRO} MATCHES fedora OR (${LINUX_DISTRO} MATCHES opensuse-tumbleweed)) + elseif (${LINUX_DISTRO} MATCHES fedora OR (${LINUX_DISTRO} MATCHES opensuse-tumbleweed) OR (${LINUX_DISTRO} MATCHES gentoo)) set(_LIB lib${ADDRESS_SIZE}) else () set(_LIB lib) diff --git a/indra/llprimitive/CMakeLists.txt b/indra/llprimitive/CMakeLists.txt index 8d2e592a41..00d821c470 100644 --- a/indra/llprimitive/CMakeLists.txt +++ b/indra/llprimitive/CMakeLists.txt @@ -23,7 +23,7 @@ if(LINUX OR CMAKE_SYSTEM_NAME MATCHES FreeBSD ) ) set(OPT_COLLADA14 TRUE) add_subdirectory( - "${CMAKE_SOURCE_DIR}/../../3p-colladadom-2.3-r8" "colladadom") + "${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r8" "colladadom") target_include_directories( ll::colladadom INTERFACE ${colladadom_SOURCE_DIR}/include diff --git a/indra/llwebrtc/CMakeLists.txt b/indra/llwebrtc/CMakeLists.txt index 1e9898e5cc..c4971d44b1 100644 --- a/indra/llwebrtc/CMakeLists.txt +++ b/indra/llwebrtc/CMakeLists.txt @@ -82,7 +82,7 @@ if (INSTALL) set(_LIB ../Frameworks) elseif (${LINUX_DISTRO} MATCHES debian OR (${LINUX_DISTRO} MATCHES ubuntu)) set(_LIB lib/${ARCH}-linux-gnu) - elseif (${LINUX_DISTRO} MATCHES fedora OR (${LINUX_DISTRO} MATCHES opensuse-tumbleweed)) + elseif (${LINUX_DISTRO} MATCHES fedora OR (${LINUX_DISTRO} MATCHES opensuse-tumbleweed) OR (${LINUX_DISTRO} MATCHES gentoo)) set(_LIB lib${ADDRESS_SIZE}) else (DARWIN) set(_LIB lib) diff --git a/indra/media_plugins/cef/CMakeLists.txt b/indra/media_plugins/cef/CMakeLists.txt index 3fa029f260..1502d16cfc 100644 --- a/indra/media_plugins/cef/CMakeLists.txt +++ b/indra/media_plugins/cef/CMakeLists.txt @@ -154,7 +154,7 @@ if (INSTALL) elseif (LINUX) if (${LINUX_DISTRO} MATCHES debian OR (${LINUX_DISTRO} MATCHES ubuntu)) set(_LIB lib/${ARCH}-linux-gnu) - elseif (${LINUX_DISTRO} MATCHES fedora OR (${LINUX_DISTRO} MATCHES opensuse-tumbleweed)) + elseif (${LINUX_DISTRO} MATCHES fedora OR (${LINUX_DISTRO} MATCHES opensuse-tumbleweed) OR (${LINUX_DISTRO} MATCHES gentoo)) set(_LIB lib${ADDRESS_SIZE}) else () set(_LIB lib) diff --git a/indra/media_plugins/libvlc/CMakeLists.txt b/indra/media_plugins/libvlc/CMakeLists.txt index 91e6df92de..547733496f 100644 --- a/indra/media_plugins/libvlc/CMakeLists.txt +++ b/indra/media_plugins/libvlc/CMakeLists.txt @@ -92,7 +92,7 @@ if (INSTALL) ) elseif (${LINUX_DISTRO} MATCHES debian OR (${LINUX_DISTRO} MATCHES ubuntu)) set(_LIB lib/${ARCH}-linux-gnu) - elseif (${LINUX_DISTRO} MATCHES fedora OR (${LINUX_DISTRO} MATCHES opensuse-tumbleweed)) + elseif (${LINUX_DISTRO} MATCHES fedora OR (${LINUX_DISTRO} MATCHES opensuse-tumbleweed) OR (${LINUX_DISTRO} MATCHES gentoo)) set(_LIB lib${ADDRESS_SIZE}) else (DARWIN) set(_LIB lib) diff --git a/indra/newview/ViewerInstall.cmake b/indra/newview/ViewerInstall.cmake index 373c771253..9292802e7c 100644 --- a/indra/newview/ViewerInstall.cmake +++ b/indra/newview/ViewerInstall.cmake @@ -103,7 +103,7 @@ endif (${LINUX_DISTRO} MATCHES arch) if (LINUX) if (${LINUX_DISTRO} MATCHES debian OR (${LINUX_DISTRO} MATCHES ubuntu)) set(_LIB lib/${ARCH}-linux-gnu) - elseif (${LINUX_DISTRO} MATCHES fedora OR (${LINUX_DISTRO} MATCHES opensuse-tumbleweed)) + elseif (${LINUX_DISTRO} MATCHES fedora OR (${LINUX_DISTRO} MATCHES opensuse-tumbleweed) OR (${LINUX_DISTRO} MATCHES gentoo)) set(_LIB lib${ADDRESS_SIZE}) else () set(_LIB lib) diff --git a/indra/newview/linux_tools/megapahit.desktop b/indra/newview/linux_tools/megapahit.desktop index 05e5d0175a..091df71e11 100755 --- a/indra/newview/linux_tools/megapahit.desktop +++ b/indra/newview/linux_tools/megapahit.desktop @@ -5,6 +5,6 @@ Exec=megapahit Icon=megapahit Terminal=false Type=Application -Categories=Application;Network; +Categories=Network; StartupNotify=true X-Desktop-File-Install-Version=3.0" diff --git a/indra/newview/llcallingcard.h b/indra/newview/llcallingcard.h index 48b93fdf9d..bd263b4bdb 100644 --- a/indra/newview/llcallingcard.h +++ b/indra/newview/llcallingcard.h @@ -30,6 +30,7 @@ #include <map> #include <set> #include <string> +#include <queue> #include <vector> #include "lluserrelations.h" #include "lluuid.h" |