aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am4
-rw-r--r--NEWS1
-rw-r--r--g-ir-extract-deps.c72
3 files changed, 1 insertions, 76 deletions
diff --git a/Makefile.am b/Makefile.am
index 87d54ea..5e5aaed 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -70,10 +70,6 @@ rpmeval_SOURCES = rpmeval.c
rpmeval_LDADD = -lrpmio -lrpm
-foobar_pkglibexec_PROGRAMS = g-ir-extract-deps
-
-g_ir_extract_deps_SOURCES = g-ir-extract-deps.c
-
noinst_DATA = $(pkg_gconfig)
foobar_pkglib_DATA = \
diff --git a/NEWS b/NEWS
index 4b5d603..b145906 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,5 @@
- remove kmod.* from git (now SRPMS sources)
+- remove now useless g-ir-extract-deps
Version 2.3 - 18 September 2014, by Pascal Terjan
diff --git a/g-ir-extract-deps.c b/g-ir-extract-deps.c
deleted file mode 100644
index f0cf725..0000000
--- a/g-ir-extract-deps.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- extract the dependencies string from a GObject Introspection 1.0 typelib file
- and print it on stdout
-*/
-
-#include <stdio.h>
-#include <stdint.h>
-#include <stdlib.h>
-
-#define G_IR_MAGIC "GOBJ\nMETADATA\r\n\032"
-
-int main(int argc, char ** argv)
-{
- FILE * typelib;
- char * magic;
- uint32_t deps_offset;
- char * deps;
-
- if (argc < 2)
- {
- fprintf(stderr, "too few arguments\n");
- exit(1);
- }
-
- typelib = fopen(argv[1], "r");
- if (typelib == NULL)
- {
- fprintf(stderr, "failed to open %s\n", argv[1]);
- exit(1);
- }
- magic = malloc(16);
- deps = malloc(8192);
- if ((magic == NULL) || (deps == NULL))
- {
- fprintf(stderr, "failed to allocate memory\n");
- exit(1);
- }
- if (fread(magic, 16, 1, typelib) < 1)
- {
- fprintf(stderr, "failed to read magic from typelib\n");
- exit(1);
- }
- if (strcmp(magic, G_IR_MAGIC))
- {
- fprintf(stderr, "magic mismatch, not a typelib?\n");
- exit(1);
- }
-
- fseek(typelib, 36, SEEK_SET);
- if (fread(&deps_offset, 4, 1, typelib) < 1)
- {
- fprintf(stderr, "failed to read deps offset from typelib\n");
- exit(1);
- }
- if (deps_offset > 0)
- {
- fseek(typelib, deps_offset, SEEK_SET);
- if (fscanf(typelib, "%8191s", deps) < 1)
- {
- fprintf(stderr, "failed to read deps from typelib\n");
- exit(1);
- }
-
- printf("%s\n", deps);
- }
-
- free(deps);
- free(magic);
- fclose(typelib);
-
- return 0;
-}