From 1d6bcda0142f2ccd807b7e79339b62cc2cc69913 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Wed, 13 May 2015 21:21:29 -0400 Subject: [PATCH] Add pkg-config .pc file, bug919. --- .gitignore | 1 + Changes | 2 ++ MANIFEST.SKIP | 2 ++ Makefile.in | 8 ++++++++ configure.ac | 4 +++- verilator.pc.in | 13 +++++++++++++ 6 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 verilator.pc.in diff --git a/.gitignore b/.gitignore index 7fc9bdb2c..f038c7584 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ internals.txt verilator.txt verilator_bin* verilator_coverage_bin* +verilator.pc diff --git a/Changes b/Changes index 5b88d6a03..6c53dd243 100644 --- a/Changes +++ b/Changes @@ -5,6 +5,8 @@ indicates the contributor was also the author of the fix; Thanks! * Verilator 3.873 devel +*** Add pkg-config .pc file, bug919. [Stefan Wallentowitz] + **** Fix installing missing manpages, bug908. [Ahmed El-Mahmoudy] **** Fix core dump in sync-async warnings, bug911. [Sebastian Dressler] diff --git a/MANIFEST.SKIP b/MANIFEST.SKIP index ca6161f03..0c901cad4 100644 --- a/MANIFEST.SKIP +++ b/MANIFEST.SKIP @@ -12,6 +12,7 @@ .*\.tex .*\.key .*\.vcd +.*\.1 /obj_dir/ /obj_dbg/ /obj_opt/ @@ -27,6 +28,7 @@ config.cache$ config.status$ verilator.log verilator.tex +verilator.pc$ verilator_bin.* verilator_coverage_bin.* .vcsmx_rebuild$ diff --git a/Makefile.in b/Makefile.in index 532113e28..c57d156bd 100644 --- a/Makefile.in +++ b/Makefile.in @@ -84,6 +84,10 @@ infodir = @infodir@ # Generally ${prefix}/share/verilator pkgdatadir = @pkgdatadir@ +# Directory in which to install pkgconfig file +# Generall ${prefix}/share/pkgconfig +pkgconfigdir = @pkgconfigdir@ + # Directory in which to install data across multiple architectures datarootdir = @datarootdir@ @@ -314,6 +318,8 @@ installdata: ; for p in $(VL_INST_DATA_SRCDIR_FILES) ; do \ $(INSTALL_DATA) $$p $(DESTDIR)$(pkgdatadir)/examples/$$p; \ done + $(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(pkgconfigdir) + $(INSTALL_DATA) verilator.pc $(DESTDIR)$(pkgconfigdir) # We don't trust rm -rf, so rmdir instead as it will fail if user put in other files uninstall: @@ -323,6 +329,7 @@ uninstall: -cd $(DESTDIR)$(pkgdatadir) && rm -f $(VL_INST_INC_BLDDIR_FILES) -cd $(DESTDIR)$(pkgdatadir) && rm -f $(VL_INST_INC_SRCDIR_FILES) -cd $(DESTDIR)$(pkgdatadir)/examples && rm -f $(VL_INST_DATA_SRCDIR_FILES) + -rm $(DESTDIR)$(pkgconfigdir)/verilator.pc -rmdir $(DESTDIR)$(pkgdatadir)/bin -rmdir $(DESTDIR)$(pkgdatadir)/include/vltstd -rmdir $(DESTDIR)$(pkgdatadir)/include @@ -332,6 +339,7 @@ uninstall: -rmdir $(DESTDIR)$(pkgdatadir)/examples/test_v -rmdir $(DESTDIR)$(pkgdatadir)/examples -rmdir $(DESTDIR)$(pkgdatadir) + -rmdir $(DESTDIR)$(pkgconfigdir) install: all_nomsg install-all install-all: installbin installman installdata install-msg diff --git a/configure.ac b/configure.ac index b73fd9fc9..7180a2c96 100644 --- a/configure.ac +++ b/configure.ac @@ -8,7 +8,7 @@ #AC_INIT([Verilator],[#.### devel]) AC_INIT([Verilator],[3.873 devel]) AC_CONFIG_HEADER(src/config_build.h) -AC_CONFIG_FILES(Makefile src/Makefile src/Makefile_obj include/verilated.mk include/verilated_config.h) +AC_CONFIG_FILES(Makefile src/Makefile src/Makefile_obj include/verilated.mk include/verilated_config.h verilator.pc) AC_MSG_RESULT([configuring for $PACKAGE_STRING]) @@ -161,6 +161,8 @@ AC_SUBST(CFG_CXXFLAGS_NO_UNUSED) # Other install directories pkgdatadir=${datadir}/verilator AC_SUBST(pkgdatadir) +pkgconfigdir=${datadir}/pkgconfig +AC_SUBST(pkgconfigdir) AC_OUTPUT diff --git a/verilator.pc.in b/verilator.pc.in new file mode 100644 index 000000000..75532e4ec --- /dev/null +++ b/verilator.pc.in @@ -0,0 +1,13 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +datarootdir=@datarootdir@ +includedir=@pkgdatadir@/include + +Name: verilator +Description: fast free Verilog simulator +URL: http://www.veripool.org/verilator +Version: @PACKAGE_VERSION@ +Requires: +Libs: +Cflags: -I${includedir}