[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/pq 04c91e8374 63/63: add pq.el and move pq.c -> pq-core
From: |
ELPA Syncer |
Subject: |
[elpa] externals/pq 04c91e8374 63/63: add pq.el and move pq.c -> pq-core.c |
Date: |
Mon, 14 Feb 2022 23:24:28 -0500 (EST) |
branch: externals/pq
commit 04c91e8374bdfe7c2f973a0123c770910f1341bb
Author: Tom Gillespie <tgbugs@gmail.com>
Commit: Tom Gillespie <tgbugs@gmail.com>
add pq.el and move pq.c -> pq-core.c
The objective of this is to keep *elpa packaging systems happy by having
an elisp file that matches the name of the package.
Also updated the Makefile to use emacs to get the version and look for
emacs-module.h in /usr/share/emacs/${emacs-version}/src/ and in
/usr/include/emacs-${emacs-major-version}-*/.
---
Makefile | 10 +++++++---
pq.c => pq-core.c | 2 +-
pq.el | 32 ++++++++++++++++++++++++++++++++
3 files changed, 40 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
index d1cd312d4c..9712526fe1 100644
--- a/Makefile
+++ b/Makefile
@@ -1,16 +1,20 @@
EMACS = emacs
+EMACS_VERSION := $(shell $(EMACS) -q --batch --eval "(princ emacs-version)")
+EMACS_MAJOR_VERSION := $(shell $(EMACS) -q --batch --eval "(princ
emacs-major-version)")
+EMACS_INCLUDE_DIR := $(wildcard /usr/include/emacs-$(EMACS_MAJOR_VERSION)*)
+EMACS_SRC_DIR := /usr/share/emacs/$(EMACS_VERSION)
PG_CONFIG = pg_config
PGINCLUDEDIR := $(shell $(PG_CONFIG) --includedir)
CC = gcc
-CFLAGS = -I$(CURDIR) -I$(HOME)/ext/emacs/src/ -I$(PGINCLUDEDIR) -std=gnu99
-ggdb3 -Wall -fPIC
+CFLAGS = -I$(CURDIR) -I$(EMACS_INCLUDE_DIR) -I$(EMACS_SRC_DIR)
-I$(PGINCLUDEDIR) -std=gnu99 -ggdb3 -Wall -fPIC
LDFLAGS = -lpq
ifeq ($(OS),Windows_NT)
-TARGET = pq.dll
+TARGET = pq-core.dll
else
-TARGET = pq.so
+TARGET = pq-core.so
endif
all: $(TARGET)
diff --git a/pq.c b/pq-core.c
similarity index 99%
rename from pq.c
rename to pq-core.c
index abf6e0ee63..83c04c6b04 100644
--- a/pq.c
+++ b/pq-core.c
@@ -452,7 +452,7 @@ emacs_module_init (struct emacs_runtime *ert)
env->funcall(env, Fdefine_error, 2, args);
}
- provide(env, "pq");
+ provide(env, "pq-core");
/* loaded successfully */
return 0;
diff --git a/pq.el b/pq.el
new file mode 100644
index 0000000000..3570882ce7
--- /dev/null
+++ b/pq.el
@@ -0,0 +1,32 @@
+;;; pq.el --- libpq binding
+
+;; Copyright (C) 2020 by Tom Gillespie
+
+;; Author: Tom Gillespie
+;; URL: https://github.com/tgbugs/emacs-libpq
+;; Version: 0.01
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program 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 General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; An almost completely empty wrapper to simplify packaging on *elpa.
+
+;;; Code:
+
+(require 'pq-core)
+
+(provide 'pq)
+
+;;; pq.el ends here
- [elpa] externals/pq 33e626d5b8 11/63: README: It's no longer quick and dirty., (continued)
- [elpa] externals/pq 33e626d5b8 11/63: README: It's no longer quick and dirty., ELPA Syncer, 2022/02/14
- [elpa] externals/pq 45a732a4c2 31/63: Add test for signal error, ELPA Syncer, 2022/02/14
- [elpa] externals/pq 6ab076af29 26/63: Fix memory leak., ELPA Syncer, 2022/02/14
- [elpa] externals/pq 191b842a56 21/63: Add missing static declarations., ELPA Syncer, 2022/02/14
- [elpa] externals/pq f896dabb85 22/63: Install notice receiver while fetching results as well., ELPA Syncer, 2022/02/14
- [elpa] externals/pq 8964028f11 25/63: Coerce non-string query parameters into strings., ELPA Syncer, 2022/02/14
- [elpa] externals/pq 83157bd41e 32/63: Cleanup session initialization., ELPA Syncer, 2022/02/14
- [elpa] externals/pq 3026279578 48/63: Use pg_config with --includedir instead of --pkgincludedir., ELPA Syncer, 2022/02/14
- [elpa] externals/pq 56fde7b255 53/63: Improve docstrings., ELPA Syncer, 2022/02/14
- [elpa] externals/pq c9df58b1ac 49/63: Always look up t and nil instead of caching them., ELPA Syncer, 2022/02/14
- [elpa] externals/pq 04c91e8374 63/63: add pq.el and move pq.c -> pq-core.c,
ELPA Syncer <=
- [elpa] externals/pq 8cc484c68b 62/63: README: Fix typos., ELPA Syncer, 2022/02/14
- [elpa] externals/pq 272b18abec 43/63: Makefile: Add dependency to check target., ELPA Syncer, 2022/02/14
- [elpa] externals/pq bec131bfae 61/63: README: Elaborate on usage., ELPA Syncer, 2022/02/14
- [elpa] externals/pq 8044537122 23/63: Add testcase that provokes a NOTIFY., ELPA Syncer, 2022/02/14
- [elpa] externals/pq 5566645359 56/63: Fix ERROR-DATA not being a list., ELPA Syncer, 2022/02/14
- [elpa] externals/pq d4c53f6461 55/63: Update README., ELPA Syncer, 2022/02/14
- [elpa] externals/pq 0501c66e6a 51/63: Add testcase for crash reported by "717g301github"., ELPA Syncer, 2022/02/14
- [elpa] externals/pq bc939f732e 30/63: Setup emacs ert tests, ELPA Syncer, 2022/02/14
- [elpa] externals/pq 555791fef3 18/63: Add GPLv3 license., ELPA Syncer, 2022/02/14
- [elpa] externals/pq d8bca4bbd0 33/63: test: Add case that garbage-collects user-pointers., ELPA Syncer, 2022/02/14