14
0

Accepting request 1206651 from home:jirislaby:branches:devel:languages:python

- switch to cmake + ninja
  * the former builds a proper lib
- package the shared library, fasttext binary and -devel properly
  (create new %package's for those)
- add patches to fit our needs:
  * no-static-lib.patch
  * proper-lib-dir.patch
  * py-link-against-shared.patch

OBS-URL: https://build.opensuse.org/request/show/1206651
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-fasttext?expand=0&rev=11
This commit is contained in:
2024-10-11 00:39:33 +00:00
committed by Git OBS Bridge
parent 39d11ff019
commit db96e3713d
5 changed files with 165 additions and 16 deletions

25
proper-lib-dir.patch Normal file
View File

@@ -0,0 +1,25 @@
From: Jiri Slaby <jslaby@suse.cz>
Subject: [PATCH] proper lib dir
Patch-mainline: no
Do not install to /usr/lib. Use CMAKE_INSTALL_LIBDIR instead (lib64 on
64bit).
Actually use CMAKE_INSTALL_* everywhere.
---
CMakeLists.txt | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -63,7 +63,7 @@ add_executable(fasttext-bin src/main.cc)
target_link_libraries(fasttext-bin pthread fasttext-shared)
set_target_properties(fasttext-bin PROPERTIES PUBLIC_HEADER "${HEADER_FILES}" OUTPUT_NAME fasttext)
install (TARGETS fasttext-shared
- LIBRARY DESTINATION lib)
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
install (TARGETS fasttext-bin
- RUNTIME DESTINATION bin
- PUBLIC_HEADER DESTINATION include/fasttext)
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/fasttext)