]> git.ipfire.org Git - pakfire.git/commitdiff
build: Simplify check for libtool archives and static libraries
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 27 Oct 2024 08:34:51 +0000 (08:34 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 27 Oct 2024 11:37:55 +0000 (11:37 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/build.c
src/libpakfire/file.c
src/libpakfire/include/pakfire/file.h

index f796b0bd032f68771ff2b816b3c895b672ec312a..5f9e2c524964c18144254e4c99489e44527996a0 100644 (file)
@@ -1131,7 +1131,7 @@ static int __pakfire_build_remove_static_libraries(
        int r;
 
        // Find all static libraries
-       if (pakfire_file_matches_class(file, PAKFIRE_FILE_STATIC_LIBRARY)) {
+       if (pakfire_file_matches(file, "**.a")) {
                // Copy the filename
                r = pakfire_string_set(path, pakfire_file_get_abspath(file));
                if (r)
@@ -1163,7 +1163,7 @@ static int __pakfire_build_remove_libtool_archives(
        struct pakfire_filelist* removees = (struct pakfire_filelist*)data;
 
        // Find all libtool archive files
-       if (pakfire_file_matches_class(file, PAKFIRE_FILE_LIBTOOL_ARCHIVE))
+       if (pakfire_file_matches(file, "**.la"))
                return pakfire_filelist_add(removees, file);
 
        return 0;
index bd92039f4aeb078b0977a6031b4cd67c9accffdd..8e003c6cb4274c5121268f9006d0770fb755ee83 100644 (file)
@@ -1349,8 +1349,6 @@ static const struct pattern {
        const char* pattern;
        int class;
 } patterns[] = {
-       { "**.a",  PAKFIRE_FILE_STATIC_LIBRARY },
-       { "**.la", PAKFIRE_FILE_LIBTOOL_ARCHIVE },
        { "**.pm", PAKFIRE_FILE_PERL },
        { NULL },
 };
index 9d23fbc5296feb30cee0095a84de731377357f27..9be4649ce9d3de0f6348c4ec8f8541946efc20aa 100644 (file)
@@ -124,8 +124,6 @@ enum pakfire_file_classes {
 
        // The rest
        PAKFIRE_FILE_PERL            = (1 << 10),
-       PAKFIRE_FILE_STATIC_LIBRARY  = (1 << 11),
-       PAKFIRE_FILE_LIBTOOL_ARCHIVE = (1 << 12),
 };
 
 int pakfire_file_is_executable(struct pakfire_file* file);