Build libisofs as a shared library.

Signed-off-by: gregory guy <gregory-tde@laposte.net>
pull/65/head
gregory guy pirms 4 gadiem
vecāks ecd1e4bd40
revīzija df80d18956
Šim parakstam datu bāzē netika atrasta zināma atslēga
GPG atslēgas ID: 3BCCA0F7AB4536F4

@ -1,17 +1,16 @@
#################################################
#
# (C) 2010 Serghei Amelian
# serghei (DOT) amelian (AT) gmail.com
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
###########################################
# #
# (C) 2010 Serghei Amelian #
# serghei (DOT) amelian (AT) gmail.com #
# #
# Improvements and feedback are welcome #
# #
# This file is released under GPL >= 2 #
# #
###########################################
add_subdirectory( libisofs )
include_directories(
${TQT_INCLUDE_DIRS}
${CMAKE_BINARY_DIR}
@ -21,47 +20,53 @@ include_directories(
${CMAKE_SOURCE_DIR}/tdecore
${CMAKE_SOURCE_DIR}/tdeio
${CMAKE_SOURCE_DIR}/tdeio/tdeio
${CMAKE_BINARY_DIR}/tdeioslave/iso/libisofs
)
link_directories(
${TQT_LIBRARY_DIRS}
)
##### other data ################################
install( FILES iso.protocol DESTINATION ${SERVICES_INSTALL_DIR} )
install( FILES isoservice.desktop DESTINATION ${DATA_INSTALL_DIR}/konqueror/servicemenus )
install( FILES tdeio_isorc DESTINATION ${CONFIG_INSTALL_DIR} )
install( FILES tdeio_iso.desktop DESTINATION ${APPS_INSTALL_DIR} )
set( SRCS kisodirectory.cpp
kisofile.cpp
qfilehack.cpp
kiso.cpp
)
##### tdeio_iso ###################################
##### tdeio_iso (plugin)
set( target tdeio_iso )
tde_add_kpart( tdeio_iso AUTOMOC
set( ${target}_SRCS
kisodirectory.cpp kisofile.cpp qfilehack.cpp
kiso.cpp iso.cpp
)
SOURCES
${SRCS}
iso.cpp
LINK
isofs-tde-shared
tdeio-shared
tde_add_kpart( ${target} AUTOMOC
SOURCES ${${target}_SRCS}
LINK isofs-static tdeio-shared
DESTINATION ${PLUGIN_INSTALL_DIR}
)
##### tdeiso_info #################################
set( target tdeiso_info )
##### tdeiso_info (executable)
set( ${target}_SRCS
kisodirectory.cpp kisofile.cpp qfilehack.cpp
kiso.cpp tdeiso_info.cpp
)
tde_add_executable( tdeiso_info AUTOMOC
SOURCES
${SRCS}
tdeiso_info.cpp
LINK
isofs-tde-shared
tdeio-shared
tde_add_executable( ${target} AUTOMOC
SOURCES ${${target}_SRCS}
LINK isofs-static tdeio-shared
DESTINATION ${BIN_INSTALL_DIR}
)
)
##### other data
install( FILES iso.protocol DESTINATION ${SERVICES_INSTALL_DIR} )
install( FILES isoservice.desktop DESTINATION ${DATA_INSTALL_DIR}/konqueror/servicemenus )
install( FILES tdeio_isorc DESTINATION ${CONFIG_INSTALL_DIR} )
install( FILES tdeio_iso.desktop DESTINATION ${APPS_INSTALL_DIR} )

@ -36,7 +36,7 @@
#include <errno.h> // to be removed
#include "libisofs/iso_fs.h"
#include "libisofs/iso_fs_tde.h"
#include "kisofile.h"
#include "kisodirectory.h"

@ -38,7 +38,7 @@
#include <kfilterbase.h>
#include "kiso.h"
#include "libisofs/isofs.h"
#include "libisofs/isofs_tde.h"
#include "qfilehack.h"

@ -1,23 +1,57 @@
#################################################
#
# (C) 2010 Serghei Amelian
# serghei (DOT) amelian (AT) gmail.com
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
###########################################
# #
# (C) 2010 Serghei Amelian #
# serghei (DOT) amelian (AT) gmail.com #
# #
# Improvements and feedback are welcome #
# #
# This file is released under GPL >= 2 #
# #
###########################################
set( LIB_NAME isofs-tde )
configure_file( isofs_tde_export.h.cmake isofs_tde_export.h @ONLY )
include_directories(
${CMAKE_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}
)
##### isofs-tde (shared)
tde_add_library( ${LIB_NAME} SHARED
SOURCES
isofs_tde.c
DESTINATION ${LIB_INSTALL_DIR}
)
##### pkg-config
string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" PC_EXEC_PREFIX ${EXEC_INSTALL_PREFIX} )
string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" PC_INCLUDE_DIR ${INCLUDE_INSTALL_DIR} )
string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" PC_LIB_DIR ${LIB_INSTALL_DIR} )
configure_file( ${LIB_NAME}.pc.cmake ${LIB_NAME}.pc @ONLY )
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/${LIB_NAME}.pc
DESTINATION ${PKGCONFIG_INSTALL_DIR}
)
##### isofs-static ##############################
##### headers
set( target isofs )
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/isofs_tde_export.h
el_torito_tde.h
isofs_tde.h
rock_tde.h
iso_fs_tde.h
bswap_tde.h
tde_add_library( ${target} STATIC_PIC
SOURCES isofs.c
DESTINATION ${INCLUDE_INSTALL_DIR}
)

@ -1,7 +1,7 @@
/* From the mplayer project (www.mplayerhq.hu) */
#ifndef __BSWAP_H__
#define __BSWAP_H__
#ifndef BSWAP_TDE
#define BSWAP_TDE
#ifdef HAVE_CONFIG_H
#include "config.h"
@ -91,4 +91,4 @@ inline static unsigned long long int ByteSwap64(unsigned long long int x)
#define le2me_64(x) (x)
#endif
#endif
#endif /* BSWAP_TDE */

@ -1,7 +1,7 @@
#ifndef ELTORITO_H
#define ELTORITO_H 1
#ifndef EL_TORITO_TDE
#define EL_TORITO_TDE
#include "iso_fs.h"
#include "iso_fs_tde.h"
#define EL_TORITO_ID "EL TORITO SPECIFICATION\0\0\0\0\0\0\0\0\0"
@ -60,4 +60,4 @@ struct section_entry_ext {
char vendor_selcrit [ISODCL ( 3, 32)];
};
#endif
#endif /* EL_TORITO_TDE */

@ -1,9 +1,9 @@
/* From the linux kernel */
#ifndef _ISO_FS_H
#define _ISO_FS_H 1
#ifndef ISO_FS_TDE
#define ISO_FS_TDE
#include "bswap.h"
#include "bswap_tde.h"
/*
* The isofs filesystem constants/structures
@ -215,5 +215,5 @@ __inline unsigned int isonum_733(char *p)
return le2me_32(*(unsigned int *)p);
}
#endif /*_ISOFS_H*/
#endif /* ISO_FS_TDE */

@ -0,0 +1,12 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=@PC_EXEC_PREFIX@
libdir=@PC_LIB_DIR@
includedir=@PC_INCLUDE_DIR@
Name: @LIB_NAME@
Description: @LIB_NAME@ implements the ISO-9660 file system found on CD-ROM media.
URL: https://mirror.git.trinitydesktop.org/gitea/TDE/tdelibs.git
Requires:
Version:
Libs: -L${libdir} -l@LIB_NAME@
Cflags: -I${includedir}

@ -20,10 +20,13 @@
#include <stdlib.h>
#include <string.h>
#include "isofs.h"
#include "isofs_tde.h"
/**************************************************************/
extern __inline unsigned char isonum_711(char *);
extern __inline unsigned short isonum_721(char *);
extern __inline unsigned int isonum_733(char *);
/* internal function from the linux kernel (isofs fs) */
static time_t getisotime(int year,int month,int day,int hour,

@ -15,17 +15,18 @@
* *
***************************************************************************/
#ifndef ISOFS_H
#define ISOFS_H
#ifndef ISOFS_TDE
#define ISOFS_TDE
#include <sys/time.h>
#ifdef __cplusplus
extern "C" {
#endif
#include "iso_fs.h"
#include "el_torito.h"
#include "rock.h"
#include "iso_fs_tde.h"
#include "el_torito_tde.h"
#include "rock_tde.h"
#include "isofs_tde_export.h"
typedef struct _rr_entry {
int len; /* length of structure */
@ -90,6 +91,7 @@ typedef int dircallback(struct iso_directory_record *,void *);
* This function is from the linux kernel.
* Set 'hs' to non-zero if it's a HighSierra volume
*/
LIBISOFS_EXPORT
time_t isodate_915(char * p, int hs);
/**
@ -107,6 +109,7 @@ time_t isodate_84261(char * p, int hs);
* If the function fails, returns NULL
* Don't forget to call FreeISO9660 after using the volume descriptor list!
*/
LIBISOFS_EXPORT
iso_vol_desc *ReadISO9660(readfunc *read,long long sector,void *udata);
/**
@ -120,42 +123,48 @@ void FreeISO9660(iso_vol_desc *data);
* the size of the directory is 'size'. 'callback' is called for each
* directory entry with the parameter 'udata'.
*/
LIBISOFS_EXPORT
int ProcessDir(readfunc *read,int extent,int size,dircallback *callback,void *udata);
/**
* Parses the System Use area and fills rr_entry with values
*/
LIBISOFS_EXPORT
int ParseRR(struct iso_directory_record *idr, rr_entry *rrentry);
/**
* Frees the strings in 'rrentry'
*/
LIBISOFS_EXPORT
void FreeRR(rr_entry *rrentry);
/**
* returns the joliet level from the volume descriptor
*/
LIBISOFS_EXPORT
int JolietLevel(struct iso_volume_descriptor *ivd);
/**
* Returns the size of the boot image (in 512 byte sectors)
*/
LIBISOFS_EXPORT
int BootImageSize(int media,long long len);
/**
* Frees the boot catalog entries in 'boot'. If you ever called ReadBootTable,
* then don't forget to call FreeBootTable!
*/
LIBISOFS_EXPORT
void FreeBootTable(boot_head *boot);
/**
* Reads the boot catalog into 'head'. Don't forget to call FreeBootTable!
*/
LIBISOFS_EXPORT
int ReadBootTable(readfunc *read,long long sector, boot_head *head, void *udata);
#ifdef __cplusplus
} //extern "C"
#endif
#endif
#endif /* ISOFS_TDE */

@ -0,0 +1,37 @@
/* This file is part of the TDE libraries
Copyright (c) 2020 TDE Team
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef ISOFS_TDE_EXPORT_H
#define ISOFS_TDE_EXPORT_H
/* Defined if you have fvisibility and fvisibility-inlines-hidden support. */
#cmakedefine __KDE_HAVE_GCC_VISIBILITY 1
#if defined(__KDE_HAVE_GCC_VISIBILITY)
#define LIBISOFS_NO_EXPORT __attribute__ ((visibility("hidden")))
#define LIBISOFS_EXPORT __attribute__ ((visibility("default")))
#elif defined(_WIN32)
#define LIBISOFS_NO_EXPORT
#define LIBISOFS_EXPORT __declspec(dllexport)
#else
#define LIBISOFS_NO_EXPORT
#define LIBISOFS_EXPORT
#endif
#endif /* ISOFS_TDE_EXPORT_H */

@ -1,7 +1,7 @@
/* this header is from the linux kernel */
#ifndef ROCK_H
#define ROCK_H 1
#ifndef ROCK_TDE
#define ROCK_TDE
/* These structs are used by the system-use-sharing protocol, in which the
Rock Ridge extensions are embedded. It is quite possible that other
@ -124,4 +124,4 @@ struct rock_ridge{
#define RR_RE 64 /* Relocation directory */
#define RR_TF 128 /* Timestamps */
#endif /* ROCK_H */
#endif /* ROCK_TDE */

@ -26,7 +26,7 @@
#include <kuniqueapplication.h>
#include <tdeaboutdata.h>
#include "libisofs/iso_fs.h"
#include "libisofs/iso_fs_tde.h"
#include "kiso.h"
#include "kisofile.h"

Notiek ielāde…
Atcelt
Saglabāt